All Questions

137
votes
3answers
76865 views

Angular 2 dynamic tabs with user-click chosen components

I'm trying to setup a tab system that allows for components to register themselves (with a title). The first tab is like an inbox, there's plenty of actions/link items to choose from for the users, an...
355
votes
15answers
207815 views

Angular HTML binding

I am writing an Angular application, and I have an HTML response I want to display. How do I do that? If I simply use the binding syntax {{myVal}} it encodes all HTML characters (of course). I need s...
80
votes
4answers
32156 views

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 students">{{student.name}}</li> It's wonderful that it updates whenever I add...
18
votes
1answers
28126 views

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 unable to print that as initially my Object is null and it is being populated via a Promise. This is my...
101
votes
1answers
44409 views

Angular 2 data attributes

I feel like I am missing something, but when I try to use a data attribute in my template, like this: <ol class="viewer-nav"><li *ngFor="#section of sections" data-sectionvalue="{{ sect...
15
votes
5answers
28583 views

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 until, being annoyed by the clutter of HTML using the template, I used template ...
41
votes
5answers
51693 views

Angular2 multiple router-outlet in the same template

Is it possible to have a multiple router-outlet in the same template? if yes then how to configure the routes? I am using angular2 beta. Thanks.
43
votes
11answers
94578 views

Angular 2 OrderBy Pipe

I'm not able to translate this code from angualr1 to angular2, any help? ng-repeat="todo in todos | orderBy: 'completed'" This is what i've done following the Thierry Templier's answer: html tem...
11
votes
2answers
8299 views

Angular 2 input parameters on root directive

This example shows how to use @Input() annotation on child components. My question is how do you use it on root component? For example if you modify code on the link above: @Component({ selector: 'ap...
4
votes
2answers
1030 views

Angular2: How is ngfor expanded

I know the textbook rules on that <div *ngFor="let foo of foobars">{{foo.stuff}}</div> turns into <template ngFor let-foo="$implicit" [ngForOf]="foobars"><div>...</div>&l...

Previous Next