Angular 4

Change label text according to radio button selected – Type script , Angular2

You might need to change a label text according to the radio button selection in same form. And further you may no need to call functions or server end to change that label and just change it run time with minimal effort. If so you can use below code snippet.

(more…)

Advertisements

ngIf

This is simply if else condition which will update html DOM elements as you need.
But more clarification this is not completely differ from ngShow or ngHide. Because this is not updating DOM elements actually.
What this does is remove existing CSS and newly adding CSS as recreated DOM. This case ngIf will completely remove the scope of DOM and reinitialize it.

Angular2: Resolve TypeScript TS2304 compilation errors in Visual Studio

I have recently updated my angular2 project and fell into this TS2304 error in Visual Studio 2015 Error TS2304 Build:Cannot find name ‘Promise’. Error TS2304 Build:Cannot find name ‘Map’. Error TS2304 Build:Cannot find name ‘Iterable’. Error TS2304 Build:Cannot find name ‘Set’. Error TS2304 Build:Cannot find name ‘Iterator’. Package.json: { “name”: “pms”, “version”: “1.0.0”, […]

via Angular2: Resolve TypeScript TS2304 compilation errors in Visual Studio — Muhammad Hassan