随笔分类 -  Angular

上一页 1 2 3 4 5 6 7 8 9 ··· 23 下一页
摘要:When migrating AngularJS (v1.x) applications to Angular you have different options. Using Angular Elements is one of them. In this lesson we learn how 阅读全文
posted @ 2019-03-22 16:41 Zhentiw 阅读(316) 评论(0) 推荐(0) 编辑
摘要:In a real world scenario we obviously need to be able to communicate with an Angular Element embedded into our static HTML site. In this lesson we wil 阅读全文
posted @ 2019-03-19 16:56 Zhentiw 阅读(181) 评论(0) 推荐(0) 编辑
摘要:We can treat Angular Element as each standlone lib and compile each Angular element spreatly. Tool we are using to compile Angular element is 'ngx-bui 阅读全文
posted @ 2019-03-18 16:20 Zhentiw 阅读(1039) 评论(0) 推荐(0) 编辑
摘要:Make sure install the latest Angular v6 with Angular CLI. Checkout ght Github for the code. 1. Create a new application: 2. Install @angular/elements 阅读全文
posted @ 2019-02-13 22:23 Zhentiw 阅读(536) 评论(0) 推荐(0) 编辑
摘要:For example we have those code: ngSwith code, and we want to convert to i18n as well, we can use 'select' keyword: 阅读全文
posted @ 2019-02-11 22:52 Zhentiw 阅读(150) 评论(0) 推荐(0) 编辑
摘要:// Component: this.coursesTotal = this.course,length {coursesTotal, plural, =0 {No course in available.} =1 {One course is available.} other {A total of {{coursesTotal}} courses are availab... 阅读全文
posted @ 2019-02-08 16:44 Zhentiw 阅读(331) 评论(0) 推荐(0) 编辑
摘要:To add translation to the application: 'i18n' is for Angular CLI to extract all the string which need to be translated. Run: It will generate messages 阅读全文
posted @ 2019-02-07 21:13 Zhentiw 阅读(385) 评论(0) 推荐(0) 编辑
摘要:Extracting away the implementation details of ngrx from your components using the facade pattern creates some interesting possibilities in terms of it 阅读全文
posted @ 2019-01-31 00:05 Zhentiw 阅读(401) 评论(0) 推荐(0) 编辑
摘要:Communicating with a remote server via HTTP presents an extra level of complexity as there is an increased chance of race conditions and the need for 阅读全文
posted @ 2019-01-30 23:50 Zhentiw 阅读(452) 评论(0) 推荐(0) 编辑
摘要:AfterContentChecked & AfterViewChecked are called after 'OnChanges' lifecycle. And each time 'ngOnChanges' triggered, ngAfterContentChecked and ngAfte 阅读全文
posted @ 2019-01-30 15:46 Zhentiw 阅读(1027) 评论(0) 推荐(0) 编辑
摘要:1. ngOnChanges is called before ngOnInit but after constructor() 2. ngOnChanges is called because of @Input() obj, obj's reference changes. If you mut 阅读全文
posted @ 2019-01-29 18:56 Zhentiw 阅读(185) 评论(0) 推荐(0) 编辑
摘要:We explore our first stateful transaction, by devising a means to echo our state value into the resultant for independent modification. With our state 阅读全文
posted @ 2019-01-29 01:10 Zhentiw 阅读(159) 评论(0) 推荐(0) 编辑
摘要:Each component has its own ChangeDetectorRef, and we can inject ChangeDetectorRef into constructor: For example if you have a huge list can be updated 阅读全文
posted @ 2019-01-28 19:22 Zhentiw 阅读(385) 评论(0) 推荐(0) 编辑
摘要:When we pass value to a component, normally we use @Input. Angular will check whether any update on @Input on each event fires in order to keep DOM up 阅读全文
posted @ 2019-01-25 17:09 Zhentiw 阅读(169) 评论(0) 推荐(0) 编辑
摘要:Very differently to AngularJS (v1.x), Angular now has a hierarchical dependency injector. That allows to specify service definitions as well as the se 阅读全文
posted @ 2019-01-21 16:53 Zhentiw 阅读(1036) 评论(0) 推荐(0) 编辑
摘要:When we create a Service, Angluar CLI will helps us to add: It only create a instance in root dependency tree. If there is no reference to use this pr 阅读全文
posted @ 2019-01-21 16:28 Zhentiw 阅读(223) 评论(0) 推荐(0) 编辑
摘要:For example we have a component: And a driective: We want to get the driective instant inside the component code, we can use @ViewChild: Then we can a 阅读全文
posted @ 2019-01-08 16:01 Zhentiw 阅读(233) 评论(0) 推荐(0) 编辑
摘要:Source: https://blog.angularindepth.com/debug-angular-apps-in-production-without-revealing-source-maps-ab4a235edd85 Build application with source map: 阅读全文
posted @ 2019-01-07 18:53 Zhentiw 阅读(334) 评论(0) 推荐(0) 编辑
摘要:It is not clear in the Docs about {read: xx} option for @ViewChild. Based on the Source code, @ViewChild as view as Component, ElementRef, TemplateRef 阅读全文
posted @ 2018-12-28 18:40 Zhentiw 阅读(370) 评论(0) 推荐(0) 编辑
摘要:The usecase is very simple: '=0' & '=1' are exactly match, 'other' are category match for the rest of numbers, you have to use 'other', this is the ru 阅读全文
posted @ 2018-12-27 20:16 Zhentiw 阅读(378) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 ··· 23 下一页
点击右上角即可分享
微信分享提示