#--------------app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { Time} from './Time.component'
import { Timeline} from './Timeline.component'
@NgModule({
imports: [ BrowserModule ],
declarations: [ AppComponent, TimeComponent, TimelineComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }
#--------------app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `<h1>{{title}}</h1>
<time></time>
<timeline></timeline>
`
})
export class AppComponent {
title = 'My Title';
}
#--------------time.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'time',
template: `<p>Do Something With Time Here</p>`
})
export class TimeComponent {
}
#--------------timeline.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'timeline',
template: `<p>Do Something With Timeline Here</p>`
})
export class TimelineComponent {
}