摘要:
import { Component,Input} from '@angular/core';@Component({ selector: 'app-lifecycle', templateUrl: './lifecycle.component.html', styleUrls: ['./lifec 阅读全文
posted @ 2019-12-05 20:45
fpc
阅读(349)
评论(0)
推荐(0)
摘要:
父组件:news组件 子组件:header组件 阅读全文
posted @ 2019-12-05 20:39
fpc
阅读(405)
评论(0)
推荐(0)
摘要:
/*ViewChild获取dom节点 1、模板中给dom起一个名字 <div #myBox> 我是一个dom节点 </div> 2、在业务逻辑里面引入ViewChild import { Component, OnInit,ViewChild} from '@angular/core'; 3、 写在 阅读全文
posted @ 2019-12-05 20:25
fpc
阅读(388)
评论(0)
推荐(0)
摘要:
export class TodolistComponent implements OnInit { public keyword:string; public todolist:any[]=[]; constructor() { } ngOnInit() {} doAdd(e){ if(e.key 阅读全文
posted @ 2019-12-05 20:07
fpc
阅读(304)
评论(0)
推荐(0)

浙公网安备 33010602011771号