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