forked from preboot/angular-webpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.component.ts
More file actions
30 lines (26 loc) · 798 Bytes
/
app.component.ts
File metadata and controls
30 lines (26 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { Component } from '@angular/core';
import { RouteConfig, ROUTER_DIRECTIVES } from '@angular/router-deprecated';
import { ApiService } from './shared';
import { HomeComponent } from './home';
import { AboutComponent } from './about';
import '../style/app.scss';
/*
* App Component
* Top Level Component
*/
@Component({
selector: 'my-app', // <my-app></my-app>
providers: [ApiService],
directives: [...ROUTER_DIRECTIVES],
template: require('./app.component.html'),
styles: [require('./app.component.scss')],
})
@RouteConfig([
{path: '/', component: HomeComponent, name: 'Home'},
{path: '/About', component: AboutComponent, name: 'About'}
])
export class AppComponent {
url = 'https://github.com/preboot/angular2-webpack';
constructor(private api: ApiService) {
}
}