摘要: import { Component, OnInit, Input, Output, EventEmitter, SimpleChanges, OnChanges, AfterContentInit, AfterContentChecked, AfterViewChecked, AfterViewI 阅读全文
posted @ 2019-12-05 20:13 砂糖一椰子 阅读(635) 评论(0) 推荐(0) 编辑
摘要: class.className 直观,适合单一class的显示和隐藏 ngClass 非常灵活 , 可以同时操作几个类的改变 true为显示,false为失效 ngStyle 适合特殊需求,不需要class 子组件HTML<ul [ngStyle]="{'background-color':back 阅读全文
posted @ 2019-12-05 16:32 砂糖一椰子 阅读(588) 评论(0) 推荐(0) 编辑
摘要: ngIf 指令 <span *ngIf="i selectedIndex" class="botStyle"></span> 组件的输入输出 子组件: import { Component, OnInit, Input, Output, EventEmitter } from '@angular/c 阅读全文
posted @ 2019-12-05 14:56 砂糖一椰子 阅读(661) 评论(0) 推荐(0) 编辑