30秒学会 Angular 片段 – Loader Component
You can create own helper component and use it instead of *ngIf. @Component({ selector: ‘loader’, te...
You can create own helper component and use it instead of *ngIf. @Component({ selector: ‘loader’, te...
It’s possible to use @ViewChild (also @ViewChildren and @ContentChild/Children) to query for c...
It’s really easy to add keyboard shortcuts in the template: <textarea (keydown.ctrl.enter)=...
Sometimes we need to work with every single Control is a form. Here’s how it can be done: func...
Debug the component state in the browser console by running: ng.probe($0).componentInstance $0 ̵...
The Safe Navigation Operator helps with preventing null-reference exceptions in component template e...
To act upon swipes, pans, and pinhces as well as the other mobile gestures, you can use hammerjs wit...
To avoid the expensive operations, we can help Angular to track which items added or removed i.e. cu...
Here is the way to notify user that there are fields with non-valid values. markFieldsAsTouched func...
With ng-content you can pass any elements to a component. This simplifies creating reusable componen...