forked from apiman/apiman
-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.component.ts
68 lines (60 loc) · 1.86 KB
/
app.component.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* Angular 2 decorators and services
*/
import {Component} from 'angular2/core';
import {ViewEncapsulation} from 'angular2/core';
import {RouteConfig, Router} from 'angular2/router';
import {AppState} from './app.service';
import {RouterActive} from './router-active';
// Routes
import {APIs} from './apis';
import {ClientApps} from './clientApps';
import {Dashboard} from './dashboard';
import {Home} from './home';
import {Login} from './user';
import {Portal} from './apiPortal';
import {Profile} from './user';
import {Register} from './user';
import {Reset} from './user';
/*
* App Component
* Top Level Component
*/
@Component({
selector: 'app',
pipes: [],
providers: [],
directives: [RouterActive],
styles: [
require('../assets/scss/main.scss')
],
encapsulation: ViewEncapsulation.None,
template: require('./index.html')
})
@RouteConfig([
{path: '/', name: 'Home', component: Home, useAsDefault: true},
{path: '/apis', name: 'APIs', component: APIs},
{path: '/apps', name: 'Client Apps', component: ClientApps},
{path: '/dashboard', name: 'Dashboard', component: Dashboard},
{path: '/login', name: 'Login', component: Login},
{path: '/portal', name: 'API Portal', component: Portal},
{path: '/profile', name: 'Profile', component: Profile},
{path: '/register', name: 'Register', component: Register},
{path: '/reset', name: 'Reset Password', component: Reset}
])
export class App {
logoWhiteBg = 'assets/img/dev-portal-logo-01.png';
logoDarkBg = 'assets/img/dev-portal-logo-02.png';
title = 'Developer Portal';
url = 'https://twitter.com/apiman_io';
loggedIn = true;
//loggedIn = false;
constructor(public appState:AppState) {
}
get state() {
return this.appState.get();
}
ngOnInit() {
console.log('Initial App State', this.state);
}
}