Top "Angular2-template" questions

For questions referencing Angular Template Syntax including: interpolation, input(property) bindings, output(event) bindings, two-way binding, local variables, star syntax, etc.

Angular2 - should private variables be accessible in the template?

If a variable is declared private on a component class, should I be able to access it in the template …

typescript angular angular2-template
How can I add a class to an element on hover?

How to add class to a div when hovered on the div. Template - <div class="red">On …

angular angular2-template
Calling method from a Angular 2 class inside template

I have a angular 2 application that has a class called User. This user has a attribute called deleted_at that …

angular angular2-template
why *ngIf doesnt'work with ng-template?

I have a condition in the template as follows: <ng-container> <p *ngFor="let seat of InfoDetails?.seatInfo"&…

angular angular2-template ng-template
NgFor doesn't update data with Pipe in Angular2

In this scenario, I'm displaying a list of students (array) to the view with ngFor: <li *ngFor="#student of …

angular angular2-template angular2-directives angular-pipe
styleUrls not working in Angular 2

I'm using Angular 2 with SystemJS and trying to add a stylesheet to a component. Since I'm using SystemJS I can't …

angular systemjs angular2-template
Binding: Appending to href

In my Angular 2 test app, I am trying to append an id the following as part of my HTML template: &…

angular angular2-template
Angular2 nested ngFor

I need to do an equivalent of this in Angular2: <?php foreach ($somethings as $something) { foreach ($something->children …

angular angular2-template
Got interpolation ({{}}) where expression was expected

I have the following HTML but i get the the exception. How to fix it ? Parser Error: Got interpolation ({{}}) where …

angular angular2-template angular2-forms
TypeError: Cannot create property 'validator' on string '[email protected]' at setUpControl

I face issue in formGroup. First Based on URL I take some value and call to API for retrieve particular …

javascript angular angular2-routing angular2-template angular2-forms