随笔分类 -  Angular

!!!!
摘要:MessageService 代码如下 发送消息的组件 代码如下 ts html 接收消息的组件 ts 阅读全文
posted @ 2018-10-25 11:24 Godfunc 阅读(1242) 评论(0) 推荐(0)
摘要:? 用来检查 问号前面的变量为 null 或 undefined 时,程序不会出错。 ! 用来检查 感叹号后面的变量为 null 或 undefined 时, 程序不会出错。 阅读全文
posted @ 2018-10-24 17:32 Godfunc 阅读(1759) 评论(0) 推荐(0)
摘要:创建 Student class 就只有几个简单的属性(执行下面的属性可以快速生成) 创建child component ts html 修改 app.component ts html 很简单,就是将父组件的数据给子组件的一个属性; 子组件创建一个 EventEmitter, 子组件的操作会触发E 阅读全文
posted @ 2018-10-24 11:13 Godfunc 阅读(516) 评论(0) 推荐(0)