随笔分类 -  Angular

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 23 下一页
摘要:If our PWA application has a new version including some fixes and new features. By default, when you refresh your page, service worker will check ngsw 阅读全文
posted @ 2018-04-18 01:08 Zhentiw 阅读(441) 评论(0) 推荐(0)
摘要:If you alread have an existing Angular application and want to upgrade to progressive web app. 1. Install @angular/service-worker: 2. Create a file: s 阅读全文
posted @ 2018-04-18 01:02 Zhentiw 阅读(264) 评论(0) 推荐(0)
摘要:An Angular service registered on the NgModule is globally visible on the entire application. Moreover it is a singleton instance, so every component t 阅读全文
posted @ 2018-04-16 04:31 Zhentiw 阅读(193) 评论(0) 推荐(0)
摘要:In our dynamic forms lessons we obviously didn’t account for all the various edge cases you might come across. Therefore if you need a more complex se 阅读全文
posted @ 2018-04-08 19:55 Zhentiw 阅读(1096) 评论(0) 推荐(0)
摘要:So when you using input binding in Angular, it will always check for update. If you want to improve youre preformence a little bit, you can use @Attri 阅读全文
posted @ 2018-04-03 21:11 Zhentiw 阅读(234) 评论(0) 推荐(0)
摘要:In a proper unit test we want to isolate external dependencies as much as possible to guarantee a reliable test outcome. Http calls represent such ext 阅读全文
posted @ 2018-02-14 21:20 Zhentiw 阅读(565) 评论(0) 推荐(0)
摘要:In some cases your application might need to upload large amounts of data, such as files. Obviously for a good UX we should provide the user some feed 阅读全文
posted @ 2018-02-14 21:13 Zhentiw 阅读(249) 评论(0) 推荐(0)
摘要:By default the new Angular Http client (introduced in v4.3.1) uses JSON as the data format for communicating with the backend API. However, there migh 阅读全文
posted @ 2018-02-14 21:06 Zhentiw 阅读(369) 评论(0) 推荐(0)
摘要:By default the response body doesn’t contain all the data that might be needed in your app. Your server might return some special header which you hav 阅读全文
posted @ 2018-02-14 21:03 Zhentiw 阅读(521) 评论(0) 推荐(0)
摘要:Besides sending (or requesting) the actual data to the server API, there’s also often the need to send further metadata that helps the server to corre 阅读全文
posted @ 2018-02-14 20:55 Zhentiw 阅读(239) 评论(0) 推荐(0)
摘要:When communicating with some backend API, data travels over the network using the HTTP protocol. As such, failures may occur, be it on our own device 阅读全文
posted @ 2018-02-14 20:46 Zhentiw 阅读(348) 评论(0) 推荐(0)
摘要:Obviously in a real world application we do not only fetch data from the backend, but we also send data to be stored permanently on the server side. T 阅读全文
posted @ 2018-02-14 20:41 Zhentiw 阅读(368) 评论(0) 推荐(0)
摘要:@Directive({ // tslint:disable-next-line:directive-selector selector: '[scrollable]' }) 阅读全文
posted @ 2018-02-03 04:48 Zhentiw 阅读(671) 评论(0) 推荐(0)
摘要:If you're coming from AngularJS (v1.x) you probably remember the ng-true-value and ng-false-value directive which allowed to map custom boolean values 阅读全文
posted @ 2018-02-03 04:44 Zhentiw 阅读(1101) 评论(0) 推荐(0)
摘要:The idea is change from: to: To do that, we need to modify tsconfig.json file: 阅读全文
posted @ 2018-01-26 03:22 Zhentiw 阅读(217) 评论(0) 推荐(0)
摘要:Compile time configuration options allow you to provide different kind of settings based on the environment you're building the Angular app for. You m 阅读全文
posted @ 2018-01-23 19:19 Zhentiw 阅读(151) 评论(0) 推荐(0)
摘要:It always again happens (especially in real world scenarios) that you need to configure your Angular app at runtime. That configuration might be fetch 阅读全文
posted @ 2018-01-23 02:43 Zhentiw 阅读(317) 评论(0) 推荐(0)
摘要:@{{user.username}} has {{followerCount}} followers button renders here Follow Unfollow 阅读全文
posted @ 2017-12-21 01:27 Zhentiw 阅读(384) 评论(0) 推荐(0)
摘要:For example, what you want to do is navgiate from current item to next or previous item. In your component, you can dispatch action like this: So here 阅读全文
posted @ 2017-11-03 04:22 Zhentiw 阅读(551) 评论(0) 推荐(0)
摘要:AuthService: Guard: 阅读全文
posted @ 2017-11-02 04:01 Zhentiw 阅读(756) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 23 下一页