TSLint extension throwing errors in my Angular application running in Visual Studio Code

Like Tuấn Nguyễn described, you need to: Go to the Command Palette by pressing Ctrl + Shift + P, In the input that pops up at the top of the Visual Studio Code, start typing TSLint: Manage workspace library execution” and hit the Enter key. From the menu that replaces the input, pick enable workspace … Read more

Angular2 If ngModel is used within a form tag, either the name attribute must be set or the form

If ngForm is used, all the input fields which have [(ngModel)]=”” must have an attribute name with a value. <input [(ngModel)]=”firstname” name=”something”> Standalone By setting [ngModelOptions]=”{standalone: true}” one tells Angular something like, ignore the form and/or ngForm, just bind it to firstname variable please. However, if form-tag was used by mistake (like in my case … Read more

Delegation: EventEmitter or Observable in Angular

Update 2016-06-27: instead of using Observables, use either a BehaviorSubject, as recommended by @Abdulrahman in a comment, or a ReplaySubject, as recommended by @Jason Goemaat in a comment A Subject is both an Observable (so we can subscribe() to it) and an Observer (so we can call next() on it to emit a new value). … Read more

What is the difference between “ng-bootstrap” and “ngx-bootstrap”?

ng-bootstrap and ngx-bootstrap are two different projects by two different project teams that are trying to accomplish more or less the same thing – allowing you to use Bootstrap in Angular (2+) without the use of jQuery. They are both rebuilding the Bootstrap components using only Angular (no jQuery).The main differences are around which version … Read more

Is there a way to remove unused imports and declarations from Angular 2+? [closed]

Edit (as suggested in comments and other people), Visual Studio Code has evolved and provides this functionality in-built as the command “Organize imports”, with the following default keyboard shortcuts: option+Shift+O for Mac Alt + Shift + O for Windows Original answer: I hope this visual studio code extension will suffice your need: https://marketplace.visualstudio.com/items?itemName=rbbit.typescript-hero It provides … Read more