随笔分类 -  Angular

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页
摘要:Angular 2’s ngModel exposes more than just validity, it even gives you the states of whether the input has been “touched” or changed. This lesson expl 阅读全文
posted @ 2016-09-27 20:21 Zhentiw 阅读(369) 评论(0) 推荐(0)
摘要:Inputs using Angular 2’s ngModel automatically apply style classes of .ng-validand .ng-invalid each time the input’s validity changes. These classes a 阅读全文
posted @ 2016-09-27 20:00 Zhentiw 阅读(192) 评论(0) 推荐(0)
摘要:The ngModelGroup directive allows you to group together related inputs so that you structure the object represented by the form in a useful and predic 阅读全文
posted @ 2016-09-27 18:48 Zhentiw 阅读(483) 评论(0) 推荐(0)
摘要:Forms in Angular 2 are essentially wrappers around inputs that group the input values together into an object and also check that all the inputs are v 阅读全文
posted @ 2016-09-27 18:36 Zhentiw 阅读(236) 评论(0) 推荐(0)
摘要:Angular 2’s ngModel provides error objects for each of the built-in input validators. You can access these errors from a reference to the ngModel itse 阅读全文
posted @ 2016-09-27 17:55 Zhentiw 阅读(263) 评论(0) 推荐(0)
摘要:In this tutorial we are going to learn how to navigate programmatically (or imperatively) by using the Router API. We are going to learn how to use th 阅读全文
posted @ 2016-09-27 01:11 Zhentiw 阅读(621) 评论(0) 推荐(0)
摘要:In this tutorial we are going to learn how to configure the Angular 2 router to cover some commonly used routing scenarios: what if the user goes to t 阅读全文
posted @ 2016-09-26 20:39 Zhentiw 阅读(270) 评论(0) 推荐(0)
摘要:You can load resource based on the url using the a combination of ActivatedRouteand Angular 2’s Http service. Since the params and Http are both strea 阅读全文
posted @ 2016-09-26 16:38 Zhentiw 阅读(528) 评论(0) 推荐(0)
摘要:The <base href=”/”/> you define will determine how all other assets you plan on loading treat their relative paths. While you’ll most often use / as y 阅读全文
posted @ 2016-09-26 14:55 Zhentiw 阅读(774) 评论(0) 推荐(0)
摘要:Angular 2’s ActivatedRoute allows you to get the details of the current route into your components. Params on the ActivatedRoute are provided as strea 阅读全文
posted @ 2016-09-26 02:55 Zhentiw 阅读(247) 评论(0) 推荐(0)
摘要:You can easily show the user which route they are on using Angular 2’s routerLinkActive. Whenever a route matches the routerLink defined on the elemen 阅读全文
posted @ 2016-09-25 21:41 Zhentiw 阅读(473) 评论(0) 推荐(0)
摘要:Angular 2 lazy loading is a core feature of Angular 2. Lazy loading allows your application to start up faster because it only needs to use the main A 阅读全文
posted @ 2016-09-25 21:12 Zhentiw 阅读(1276) 评论(0) 推荐(0)
摘要:Angular 2 navigation is configured using the routerLink directive. The routerLink directive behaves like an href’s you are familiar with, but it hooks 阅读全文
posted @ 2016-09-25 02:54 Zhentiw 阅读(389) 评论(0) 推荐(0)
摘要:Using the Angular 2 router requires defining routes, passing them in to the RouterModule.forRoot and then importing the configured RouterModule into y 阅读全文
posted @ 2016-09-25 02:42 Zhentiw 阅读(569) 评论(0) 推荐(0)
摘要:Angular 2 templates have a special let syntax that allows you to define and pass a context when they’re being generated. We pass in an Object "desc: G 阅读全文
posted @ 2016-09-23 20:52 Zhentiw 阅读(287) 评论(0) 推荐(0)
摘要:Angular 2 Components have templates, but you can also create templates inside of your templates using Angular 2 ViewContainer’s createEmbeddedView for 阅读全文
posted @ 2016-09-23 20:39 Zhentiw 阅读(446) 评论(0) 推荐(0)
摘要:After the original order is set, you can still leverage methods on the Angular 2 ViewContainer to reorder the components. This is especially helpful w 阅读全文
posted @ 2016-09-23 19:23 Zhentiw 阅读(561) 评论(0) 推荐(0)
摘要:By default, when you generate components, they will simply be added to the page in order, one after another. Angular 2 provides methods on the ViewCon 阅读全文
posted @ 2016-09-23 19:00 Zhentiw 阅读(519) 评论(0) 推荐(0)
摘要:When you generate Angular 2 components, you’re still able to access the component instance to set properties and invoke methods from the component cla 阅读全文
posted @ 2016-09-23 16:55 Zhentiw 阅读(468) 评论(0) 推荐(0)
摘要:You can generate Angular 2 components using a combination of ViewContainer and ComponentFactory, but you must always remember to add the components yo 阅读全文
posted @ 2016-09-23 03:33 Zhentiw 阅读(615) 评论(0) 推荐(0)

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页