Skip to main content

Posts

Showing posts with the label Angular Event Binding

Angular 5 and 4 – Templates

How To Create and Use Templates in Angular 5 or 4 using Visual Studio Code? Let’s start about Templates system in Angular 5 and 4.  As you know, Angular 2 using the template tag <template> but in Angular 4+ using to <ng-template> </ng-template>. We can shay that the Angular 4 changed <template> to <ng-template> . This is the biggest changes of Angular. Stayed Informed  –  Angular 5  and  Angular 4 Documents Lest start an example and see “how looks like” – user.component.html- < div >< h2 > Angular 4 and 5 Templates </ h2 ></ div > < div >   < div * ngIf = "isAciveFlag;then cond1 else cond2" > Condition is valid. </ div >   < ng-template # cond1 > Template Cond1 - This is the 1st condition and its valid. </ ng-template >   < ng-template # cond2 > Template Cond2 - This is 2nd condition and its not valid. </ ng-template > ...

Angular 5 and 4 - Event Binding Example

How To CREATE Event Binding in Angular 5 and 4 using Visual Studio Code? Hello guys, I’m sharing the Event Binding in Angular 5 and 4 and these events are used to perform actions and also used for user interacts with an apps. Stayed Informed  –  Angular 5  and  Angular 4 Documents The events can be – 1.       Mouse click 2.       Mouse over 3.       Keyboard movement 4.       And so on Examples – user.component.html - < h2 > Web Links - </ h2 > < div >   < ul * ngFor = "let weblink of webliks" >     < li > {{weblink}} </ li >   </ ul > </ div > < div >< h2 > Angular 5 and 4 - Event Binding </ h2 ></ div > < div >   < button ( click )= "clickEvents($event)" > Please Click Me! </ button > </ div ...