I looked at several Angular 2 tutorials. I'm confused about component loading. If I want to create applications with several pages and do not need this root component, how would I do it? I see how this will work for single-page applications.
This is my Main.Ts. file
import { bootstrap } from 'angular2/platform/browser';
import { AppComponent } from './app.component';
bootstrap(AppComponent);
Here is my app.component.ts file.
import {Component} from 'angular2/core';
@Component({
selector: 'pm-app',
template: '<h1>{{PageTitle}}</h1>'
})
export class AppComponent {
PageTitle: string = "Test";
}
If I wanted to go to a page other than let. index.html, and load it with another component without involving AppComponent, how would I do it? In Angular 1+, this was simple because I simply referred to the controller on the HTML page I wanted to use. How can I simply reference the component that I want to use on another page?
Thank. Trying to wrap your head around Angular 2.