摘要: 一、父传子 在父组件ts中定义要传递的信息 在父组件html中的子组件标签中定义自定义属性来绑定父组件定义的信息 在子组件中的ts中,通过@Input来接收自定义属性的名称 import {Input} from '@angular/core'; @Input() info:string; 在子组件 阅读全文
posted @ 2020-01-10 16:22 hannahY 阅读(2151) 评论(0) 推荐(1) 编辑