摘要: Code: const disallowedMethods = ['log', 'info', 'warn', 'error', 'dir'] module.exports = { meta: { docs: { description: 'Disallow use of console', cat 阅读全文
posted @ 2020-02-17 19:50 Zhentiw 阅读(234) 评论(0) 推荐(0)
摘要: For eslint prevent console plugin, we also want to prevent user do so: var csl = console csl.log() Code: const disallowedMethods = ['log', 'info', 'wa 阅读全文
posted @ 2020-02-17 19:05 Zhentiw 阅读(156) 评论(0) 推荐(0)
摘要: Html: <input type="range" value="0" [style.--thumb-rotate]="720 * $any(input.value)/100 + 'deg'" #input (input)="0"> CSS: input[type="range"]::-webkit 阅读全文
posted @ 2020-02-17 17:30 Zhentiw 阅读(266) 评论(0) 推荐(0)
摘要: The $any() type cast function Sometimes a binding expression triggers a type error during AOT compilation and it is not possible or difficult to fully 阅读全文
posted @ 2020-02-17 17:28 Zhentiw 阅读(203) 评论(0) 推荐(0)
摘要: @Injectable({ providedIn: "root" | "any" | "platform" }) export class MyService {} More ProvidedIn: root Every service defined with 'root' will be pro 阅读全文
posted @ 2020-02-17 17:21 Zhentiw 阅读(414) 评论(0) 推荐(0)
摘要: In Angular version 8, TestBed.get was deprecated. In Angular version 9, we see why: TestBed.inject<T> is introduced as a type-safe replacement. There 阅读全文
posted @ 2020-02-17 16:48 Zhentiw 阅读(147) 评论(0) 推荐(0)