随笔分类 -  Angular

上一页 1 2 3 4 5 6 7 ··· 23 下一页
摘要:Setting up a Presentational Component: import {Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation} from '@angular/core'; import {Course 阅读全文
posted @ 2020-02-14 17:19 Zhentiw 阅读(516) 评论(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 阅读(468) 评论(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 阅读(139) 评论(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 阅读(206) 评论(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 阅读(419) 评论(0) 推荐(0)
摘要:Problem: Two ways to solve the problem: 1. Change the order: 2. Using createSelector: 阅读全文
posted @ 2020-01-16 18:37 Zhentiw 阅读(168) 评论(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 阅读(261) 评论(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 阅读(348) 评论(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 阅读(200) 评论(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 阅读(764) 评论(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 阅读(568) 评论(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 阅读(1296) 评论(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 阅读(837) 评论(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 阅读(331) 评论(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 阅读(325) 评论(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 阅读(981) 评论(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 阅读(799) 评论(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 阅读(2590) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2019-12-18 02:28 Zhentiw 阅读(6) 评论(0) 推荐(0)
摘要:First thing first, let's define a action to update entity: The 'Update' interface has props: 'id, changes'. Component usage: Reducer: Effect: 阅读全文
posted @ 2019-10-08 21:54 Zhentiw 阅读(153) 评论(0) 推荐(0)

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