随笔分类 -  Angular

上一页 1 2 3 4 5 6 7 ··· 23 下一页
摘要:onSave(personName) { this.person.name = personName; this.peopleService.save(this.person).subscribe(() => { // redirect back people list // this.router 阅读全文
posted @ 2020-02-16 23:11 Zhentiw 阅读(93) 评论(0) 推荐(0) 编辑
摘要:Setting up a Presentational Component: import {Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation} from '@angular/core'; import {Course 阅读全文
posted @ 2020-02-14 17:19 Zhentiw 阅读(511) 评论(0) 推荐(0) 编辑
摘要:How to test a service The service we want to test against: import {Injectable} from '@angular/core'; import {LoggerService} from './logger.service'; @ 阅读全文
posted @ 2020-02-12 16:50 Zhentiw 阅读(463) 评论(0) 推荐(0) 编辑
摘要:"scripts": { "ng": "ng", "start": "ng serve --proxy-config ./proxy.json", "server": "ts-node -P ./server/server.tsconfig.json ./server/server.ts", "bu 阅读全文
posted @ 2020-02-07 04:00 Zhentiw 阅读(133) 评论(0) 推荐(0) 编辑
摘要:// include all the scss @import "~@angular/material/theming"; // Include non-theme styles for core. @include mat-core(); $mat-custom-primary-theme: ( 阅读全文
posted @ 2020-02-05 04:17 Zhentiw 阅读(197) 评论(0) 推荐(0) 编辑
摘要:Fire and Forgot: Fire an action and not wait it complete. Fire and Wait: FIre an action and wait for result. Fire and Forgot Fire and Wait: Using `mer 阅读全文
posted @ 2020-01-17 15:55 Zhentiw 阅读(416) 评论(0) 推荐(0) 编辑
摘要:Problem: Two ways to solve the problem: 1. Change the order: 2. Using createSelector: 阅读全文
posted @ 2020-01-16 18:37 Zhentiw 阅读(163) 评论(0) 推荐(0) 编辑
摘要:When defining a selector, you can also pass other selectors into the signature of the Selector decorator to join other selectors with this state selec 阅读全文
posted @ 2020-01-16 18:31 Zhentiw 阅读(257) 评论(0) 推荐(0) 编辑
摘要:1. Selet piece of state from Store: This is useful when you just want to get state from the store directly. Of course that global state should contain 阅读全文
posted @ 2020-01-16 18:25 Zhentiw 阅读(344) 评论(0) 推荐(0) 编辑
摘要:This approach can also allow for the creation of well named helper functions that can be shared between handlers that require the same type of update. 阅读全文
posted @ 2020-01-16 17:07 Zhentiw 阅读(195) 评论(0) 推荐(0) 编辑
摘要:Real forms are rarely visualized as a single column with one field below the other. Rather they often span over multiple columns to save screen space. 阅读全文
posted @ 2020-01-10 20:22 Zhentiw 阅读(746) 评论(0) 推荐(0) 编辑
摘要:Assume we want to add a data-cy attribute to all of our form controls. We need this as a hook to later be able to easily grab our input fields from wi 阅读全文
posted @ 2020-01-09 19:20 Zhentiw 阅读(562) 评论(0) 推荐(0) 编辑
摘要:In a real form you'll most likely want to add some 3rd party form controls. For example autocomplete fields, date-time pickers etc. In this lesson we' 阅读全文
posted @ 2020-01-09 18:41 Zhentiw 阅读(1281) 评论(0) 推荐(0) 编辑
摘要:Formly comes with a lot of built-in validators. Nevertheless you most likely will have to to implement some custom validation. In this lesson we're go 阅读全文
posted @ 2020-01-09 18:26 Zhentiw 阅读(830) 评论(0) 推荐(0) 编辑
摘要:When you display error messages you want to make them as understandable as possible such that the user is able to figure out the problem. Example: the 阅读全文
posted @ 2020-01-09 16:43 Zhentiw 阅读(320) 评论(0) 推荐(0) 编辑
摘要:In this lesson we're going to learn how to dynamically hide a form control with Formly's hideExpressions. These expressions are evaluated automaticall 阅读全文
posted @ 2020-01-09 16:24 Zhentiw 阅读(315) 评论(0) 推荐(0) 编辑
摘要:Formly has a nice mechanism called "expression properties". These are expressions in the form of a function callback or string expression that are eva 阅读全文
posted @ 2020-01-09 16:22 Zhentiw 阅读(973) 评论(0) 推荐(0) 编辑
摘要:Ever had to disable a form control based on the value of another form control? If your city dropdown field is filtered based on the current nation dro 阅读全文
posted @ 2020-01-09 16:16 Zhentiw 阅读(792) 评论(0) 推荐(0) 编辑
摘要:Every serious form in large apps has some dependent fields. For instance a dropdown field containing all nations and another dropdown field displaying 阅读全文
posted @ 2020-01-09 16:13 Zhentiw 阅读(2575) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。
posted @ 2019-12-18 02:28 Zhentiw 阅读(6) 评论(0) 推荐(0) 编辑

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