随笔分类 -  Angular

上一页 1 2 3 4 5 6 7 8 9 10 ··· 23 下一页
摘要:When want to display different component based on some conditions: 阅读全文
posted @ 2018-12-25 01:16 Zhentiw 阅读(273) 评论(0) 推荐(0)
摘要:Using ngClass for conditional styling, here is the usage from the docs: It is also recommended when the conditional logics is complicated, we can usin 阅读全文
posted @ 2018-12-25 01:02 Zhentiw 阅读(225) 评论(0) 推荐(0)
摘要:Using Angular CLI v6, we are able to create library or small application inside a Angular CLI generated application. If for example, the lib logger-li 阅读全文
posted @ 2018-10-15 00:48 Zhentiw 阅读(149) 评论(0) 推荐(0)
摘要:A component author has no way of knowing which state changes a consumer will want to override, but state reducers handle this problem by allowing the 阅读全文
posted @ 2018-10-11 23:24 Zhentiw 阅读(275) 评论(0) 推荐(0)
摘要:If we’re going to make our toggle accessible, we’ll need to apply certain aria attributes to the control that does the toggling. Instead of making the 阅读全文
posted @ 2018-10-10 18:55 Zhentiw 阅读(169) 评论(0) 推荐(0)
摘要:Allow the base toggle to be a tag (<toggle>) or attribute (<div toggle>). The <toggle> component has become less opinionated about the view, but has n 阅读全文
posted @ 2018-10-10 03:16 Zhentiw 阅读(373) 评论(0) 推荐(0)
摘要:Allow more than one child component of the same type. Allow child components to be placed within the views of other custom components. In previous pos 阅读全文
posted @ 2018-10-10 01:58 Zhentiw 阅读(217) 评论(0) 推荐(0)
摘要:Allow the user to control the view of the toggle component. Break the toggle component up into multiple composable components that can be rearranged b 阅读全文
posted @ 2018-10-09 19:04 Zhentiw 阅读(356) 评论(0) 推荐(0)
摘要:There is now a new, recommended, way to register a provider, directly inside the @Injectable() decorator, using the new providedIn attribute. When you 阅读全文
posted @ 2018-08-29 00:34 Zhentiw 阅读(1702) 评论(0) 推荐(0)
摘要:Router Scroll Position Restoration: remember and restore scroll position as the user navigates around an application. ShadowDOM v1 View Encapsulation: 阅读全文
posted @ 2018-07-31 22:26 Zhentiw 阅读(197) 评论(0) 推荐(0)
摘要:Origianl article Protal from Angular CDK, is a way to create dynammic component. Consider an example of Page toolbar. This toolbar should show differe 阅读全文
posted @ 2018-07-09 20:34 Zhentiw 阅读(524) 评论(1) 推荐(0)
摘要:The Angular <ng-container> is a grouping element that doesn't interfere with styles or layout because Angular doesn't put it in the DOM. When we using 阅读全文
posted @ 2018-06-24 19:12 Zhentiw 阅读(205) 评论(0) 推荐(0)
摘要:When we use NGRX, we need to create some bolipates. Now with Angulalr6, we can use CLI to generate those code for us. Install: @ngrx/schematics: Scaff 阅读全文
posted @ 2018-05-28 01:52 Zhentiw 阅读(371) 评论(0) 推荐(0)
摘要:Prevent Partail Page display: By using Resolver: Display Loading spinner when switching page: Enable route debugging: Talk 阅读全文
posted @ 2018-05-07 03:08 Zhentiw 阅读(205) 评论(0) 推荐(0)
摘要:For example you make a function to get rating; Then using it in html: These code actually casues the preformance issues, because everything Angualr's 阅读全文
posted @ 2018-05-03 20:40 Zhentiw 阅读(206) 评论(0) 推荐(0)
摘要:1. Installl latest @angular/cli: The version I used is:6.0.0-rc.10 2. Create a new application: 3. Install material and cdk packages: Here need to add 阅读全文
posted @ 2018-05-03 19:43 Zhentiw 阅读(431) 评论(0) 推荐(0)
摘要:Went though tow youtube videos about NGXS https://angularfirebase.com/lessons/ngxs-quick-start-angular-state-management/ https://www.youtube.com/watch 阅读全文
posted @ 2018-04-27 18:49 Zhentiw 阅读(962) 评论(0) 推荐(0)
摘要:In this post, we are going to see how to solve one design pattern challenge. The challenge is what we a simplest way to find out the children elements 阅读全文
posted @ 2018-04-19 20:25 Zhentiw 阅读(292) 评论(0) 推荐(0)
摘要:In some cases, you want to get fresh data instead of cache data to the screen, such as stock applications. Only fallback to cache data if cannot get r 阅读全文
posted @ 2018-04-19 01:56 Zhentiw 阅读(206) 评论(0) 推荐(0)
摘要:If you want to cache API response by using angular service-worker, you can do it in: src/ngsw-config.json: 阅读全文
posted @ 2018-04-19 01:51 Zhentiw 阅读(265) 评论(0) 推荐(0)

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