随笔分类 -  Angular

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页
摘要:We have a form component: the 'type' FormControl will be a custom form element component which refers to 'workout-type' componet. For the workout-type 阅读全文
posted @ 2017-08-18 01:57 Zhentiw 阅读(384) 评论(0) 推荐(0)
摘要:Currently, patchValue doesn't support update FormArray. The workarround is you need to empty the form array first, then add items back. 阅读全文
posted @ 2017-08-17 01:31 Zhentiw 阅读(5927) 评论(0) 推荐(0)
摘要:Which hash algorithom to choose for new application: https://www.owasp.org/index.php/Password_Storage_Cheat_Sheet Argon2[*7] is the winner of the pass 阅读全文
posted @ 2017-08-16 01:02 Zhentiw 阅读(742) 评论(0) 推荐(0)
摘要:One thing that we can do is to add styles directly to HTML elements that live within our component. However, in this lesson we see that style classes 阅读全文
posted @ 2017-08-15 16:06 Zhentiw 阅读(740) 评论(0) 推荐(0)
摘要:Angular has a very robust security model. Dynamically inserted html, style or url values into the DOM open up possibilities for attackers to compromis 阅读全文
posted @ 2017-08-15 15:53 Zhentiw 阅读(234) 评论(0) 推荐(0)
摘要:We will learn how to make use of the ngStyle directive to directly add multiple style attributes to a DOM element as a style property. We’ll also lear 阅读全文
posted @ 2017-08-14 16:28 Zhentiw 阅读(235) 评论(0) 推荐(0)
摘要:It it recommeded that when deals with form component, we can create a container component to hold state, and then create a stateless component to enpo 阅读全文
posted @ 2017-08-12 18:59 Zhentiw 阅读(397) 评论(0) 推荐(0)
摘要:From Anuglar v4 above, we are able to using 'as' with async pipe. This allow as using 'new variable' instead of subscribe to observable. We also able 阅读全文
posted @ 2017-08-11 02:27 Zhentiw 阅读(464) 评论(0) 推荐(0)
摘要:For example, when we open a form, we want to see all the inputs fields comes into one by one. Code for html: So we add a animation to the container ca 阅读全文
posted @ 2017-08-09 15:55 Zhentiw 阅读(296) 评论(0) 推荐(0)
摘要:A simple store implemenet: Using this store in AuthService: Using Reactive approach in app.component.ts: 阅读全文
posted @ 2017-08-06 17:22 Zhentiw 阅读(283) 评论(0) 推荐(0)
摘要:Config AngularFire, we need database and auth module from firebase. For the SharedModule: We use forRoot method to register our AuthSerivce, so there 阅读全文
posted @ 2017-08-06 02:13 Zhentiw 阅读(449) 评论(0) 推荐(0)
摘要:Automate all the things!! Automation is crucial for increasing the quality and productivity. In this lesson we will learn how to automate the deployme 阅读全文
posted @ 2017-08-03 15:50 Zhentiw 阅读(178) 评论(0) 推荐(0)
摘要:Being able to intercept HTTP requests is crucial in a real world application. Whether it is for error handling and logging or for injecting authentica 阅读全文
posted @ 2017-08-03 03:31 Zhentiw 阅读(369) 评论(0) 推荐(0)
摘要:Simple Auth service: Using Observable is a easy way to implement reactive application. Create a BehaviorSubject and then convert subject to Observable 阅读全文
posted @ 2017-07-30 18:18 Zhentiw 阅读(265) 评论(0) 推荐(0)
摘要:For example, inside you component you want to import a file from two up directory: This becomes a little bit problematic because the component can be 阅读全文
posted @ 2017-07-28 02:30 Zhentiw 阅读(228) 评论(0) 推荐(0)
摘要:We have two blocks to show to difference ways to do animation in Angular: heightZeroFull using animation(). heightState using state(). The way to cont 阅读全文
posted @ 2017-07-27 02:53 Zhentiw 阅读(247) 评论(0) 推荐(0)
摘要:To define an Angular Animation, we using DSL type of language. Means we are going to define few animations ('fadeIn', 'fadeOut'). Then we need to defi 阅读全文
posted @ 2017-07-26 02:26 Zhentiw 阅读(1166) 评论(0) 推荐(0)
摘要:When we "Tab" into a input field, we want to select all the content, if we start typing, it should remove the existing content and add new content. We 阅读全文
posted @ 2017-07-26 01:55 Zhentiw 阅读(1056) 评论(0) 推荐(0)
摘要:We can use 'setSelectionRange(start, end)' to set cursor postion, in which start postion = end position. 阅读全文
posted @ 2017-07-24 02:28 Zhentiw 阅读(460) 评论(0) 推荐(0)
摘要:@HostListener('keydown', ['$event', '$event.keyCode']) onKeyDown($event: KeyboardEvent, keyCode) { if(keyCode !== TAB) { $event.preventDefault(); } // get value for the key ... 阅读全文
posted @ 2017-07-24 01:56 Zhentiw 阅读(287) 评论(0) 推荐(0)

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页