Reputation: 6936
I am a learner of angular-2. I have a query that can I use angular2 on a specific part of web page. e.g. I only want to use *ngFor utility of angular2 but I want that for only a div area. While it is possible in Angular-1, is it possible in angular2.
Upvotes: 1
Views: 1147
Reputation: 4748
In the main component selector just add the selector of the div
import { Component } from '@angular/core';
@Component({
selector: 'my-app', // here add the selector for your div
template: `
<router-outlet></router-outlet>
`,
})
export class AppComponent {
}
Upvotes: 2