-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.ts
29 lines (28 loc) · 1.04 KB
/
app.ts
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
import {Component, View} from 'angular2/core';
import {ViewEncapsulation} from 'angular2/core';
import {FORM_PROVIDERS} from 'angular2/common';
import {Login} from './login/login';
import {Tweets} from './tweets/tweets';
import {NavigationService} from './navigation/navigation';
import {MATERIAL_DIRECTIVES, MATERIAL_PROVIDERS} from 'ng2-material/all';
import {ROUTER_DIRECTIVES, RouteConfig} from 'angular2/router';
@Component({
selector: 'app',
providers: [...FORM_PROVIDERS, NavigationService, MATERIAL_PROVIDERS],
directives: [MATERIAL_DIRECTIVES, ROUTER_DIRECTIVES],
pipes: [],
styles: [
require('../assets/css/index.scss')
],
encapsulation: ViewEncapsulation.None,
template: require('./app.html')
})
@RouteConfig([
{path: '/login', component: Login, name: 'Login', data: {title: 'Login Page'}},
{path: '/test2', component: Tweets, name: 'Tweets', data: {title: 'Tweet Page'}},
{path: '/**', redirectTo: ['Login']}
])
export class App {
constructor(public navigation: NavigationService) {
}
}