随笔分类 -  angular

angular学习笔记
摘要:<ng-container *ngComponentOutlet="customComponent"></ng-container> 阅读全文
posted @ 2020-03-15 09:23 LLC-Mite 阅读(135) 评论(0) 推荐(0)
摘要:import subject from "nxjs/subject"; let sub = new subject(); //发布订阅 sub.subscribe(data=>{ console.log(data> }); //执行订阅的事件 sub.next(data); 阅读全文
posted @ 2020-03-15 08:27 LLC-Mite 阅读(318) 评论(0) 推荐(0)
摘要:@angular/forms里有个接口用来实现支持[(ngModel)],具体可查ControlValueAccessor,这边还未深入理解只是为了开发组件而初步了解 我们要做的事就是实现这个接口 export class SearchSelectComponent implements Contr 阅读全文
posted @ 2019-09-02 22:39 LLC-Mite 阅读(316) 评论(0) 推荐(0)
摘要:1)安装 cnpm install -g @angular/cli 2)新建项目,然后安装依赖 ng new project-name跳过安装ng new project-name --skip-install 3)使用vscode,安装插件angular提示插件angular补全 4) 快速创建组 阅读全文
posted @ 2019-05-13 20:19 LLC-Mite 阅读(189) 评论(0) 推荐(0)