摘要:
The smart component we want to test: import {Component, OnInit} from '@angular/core'; import {Course} from "../model/course"; import {Observable} from 阅读全文
摘要:
Primitive Values Undefined (undefined), used for unintentionally missing values. Null (null), used for intentionally missing values. Booleans (true an 阅读全文
摘要:
Training an algorithm involes four ingredients: Data Model Objective function: We put data input a Model and get output out of it. The value we call i 阅读全文
摘要:
For eslint prevent console plugin, we also want to prevent user do so: var csl = console csl.log() Code: const disallowedMethods = ['log', 'info', 'wa 阅读全文
摘要:
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 阅读全文
摘要:
@Injectable({ providedIn: "root" | "any" | "platform" }) export class MyService {} More ProvidedIn: root Every service defined with 'root' will be pro 阅读全文
摘要:
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 阅读全文