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.

Combine [NgStyle] With Condition (if..else)

I have read NgStyle Documentation For Angular 2, and it is a little bit confusing for me. How do I use …

angular angular2-template
angular2: Error: TypeError: Cannot read property '...' of undefined

I have attached the plunker of my angular2 code piece. I want to print a field from my JSON but …

angular angular2-template 2-way-object-databinding
What is let-* in Angular 2 templates?

I came across a strange assignment syntax inside an Angular 2 template. <template let-col let-car="rowData" pTemplate="body"> <…

angular angular2-template primeng
How to prevent Browser cache on Angular 2 site?

We're currently working on a new project with regular updates that's being used daily by one of our clients. This …

caching angular browser-cache cache-control angular2-template
Generate dynamic css based on variables angular

I am working on a admin panel developed with angular 4 and trying to integrate a sections to customize styling like …

javascript css angular typescript angular2-template
How to check the length of an Observable array

In my Angular 2 component I have an Observable array list$: Observable<any[]>; In my Template I have <…

angular observable angular2-template angular2-services
Access template reference variables from component class

<div> <input #ipt type="text"/> </div> Is it possible to access the template access …

angular typescript angular2-template
Angular 2: Can't bind to x since it isn't a known native property

In Angular 2 component I have authbox.component.ts import {Component} from 'angular2/core'; import {COMMON_DIRECTIVES} from 'angular2/common'; import {…

angular angular2-template
How to convert input value to uppercase in angular 2 (value passing to ngControl)

I am trying to validate the input fields using ngControl's value in angular 2. i need to validate that the user …

html angular angular2-template angular2-forms
Pass enums in angular2 view templates

Can we use enums in an angular2 view template? <div class="Dropdown" dropdownType="instrument"></div> passes …

enums angular angular2-template