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, what is the correct way to disable an anchor element?

I'm working on an Angular2 application, and I need to display -- but disable an <a> HTML element. …

html dom typescript angular angular2-template
Please add a @Pipe/@Directive/@Component annotation. Error

I am stuck in a situation here. I am getting an error like this. compiler.es5.js:1694 Uncaught Error: Unexpected …

angular angular2-template
<ng-container> vs <template>

ng-container is mentioned in Angular 2 documentation but there is no explanation how it works and what are use cases. It …

angular typescript angular2-template
Angular2: Cannot read property 'name' of undefined

I am beginning to learn Angular2. I've been following the Heroes Tutorial provided at angular.io. All was working fine …

angular angular2-template
Angular2 - Focusing a textbox on component load

I am developing a component in Angular2 (Beta 8). The component has a textbox and a dropdown. I would like to …

angular angular2-template angular2-forms
How can I write data attributes using Angular?

When I try to use a data attribute in my template, like this: <ol class="viewer-nav"> <li *…

angular angular2-template
Implementing autocomplete

I am having trouble finding a good autocomplete component for Angular2. Just anything that I can pass a list of …

angular angular2-template angular2-directives
No provider for TemplateRef! (NgIf ->TemplateRef)

I'm trying to show a checkmark if an answer is the accepted answer: template: `<div ngIf="answer.accepted">&…

angular angular2-template
Angular2 multiple router-outlet in the same template

Is it possible to have multiple router-outlet in the same template? If yes then how to configure the routes? I …

angular angular2-routing angular2-template
How to use Angular2 templates with *ngFor to create a table out of nested arrays?

Given the following array in component property groups: [ { "name": "pencils", "items": ["red pencil","blue pencil","yellow pencil"] }, { "name": "rubbers", "items": ["…

angular angular2-template angular-template