Initial router work.
This commit is contained in:
parent
07e38517e4
commit
b9c83f19bc
@ -1,10 +1,2 @@
|
|||||||
<!--<tb-login></tb-login>-->
|
<router-outlet></router-outlet>
|
||||||
|
|
||||||
<tb-top-nav></tb-top-nav>
|
|
||||||
|
|
||||||
<tb-board></tb-board>
|
|
||||||
|
|
||||||
<!--<tb-dashboard></tb-dashboard>-->
|
|
||||||
|
|
||||||
<!--<tb-settings></tb-settings>-->
|
|
||||||
|
|
||||||
|
@ -1,14 +1,9 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
import { ROUTER_DIRECTIVES } from '@angular/router';
|
||||||
import { Login } from './login/login.component';
|
|
||||||
import { TopNav } from './top-nav/top-nav.component';
|
|
||||||
import { Board } from './board/board.component';
|
|
||||||
import { Settings } from './settings/settings.component';
|
|
||||||
import { Dashboard } from './dashboard/dashboard.component';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-component',
|
selector: 'app-component',
|
||||||
directives: [ Login, TopNav, Board, Settings, Dashboard ],
|
directives: [ ROUTER_DIRECTIVES ],
|
||||||
templateUrl: 'app/app.component.html'
|
templateUrl: 'app/app.component.html'
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
|
16
src/app/app.routes.ts
Normal file
16
src/app/app.routes.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import { RouterConfig, provideRouter } from '@angular/router';
|
||||||
|
|
||||||
|
import { Login } from './login/login.component';
|
||||||
|
import { Board } from './board/board.component';
|
||||||
|
|
||||||
|
const ROUTES: RouterConfig = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: Login
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
export const APP_ROUTER_PROVIDERS = [
|
||||||
|
provideRouter(ROUTES)
|
||||||
|
];
|
||||||
|
|
@ -1,3 +1,5 @@
|
|||||||
|
<tb-top-nav></tb-top-nav>
|
||||||
|
|
||||||
<div class="board-nav">
|
<div class="board-nav">
|
||||||
<label>
|
<label>
|
||||||
Select Board:
|
Select Board:
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
import { TopNav } from '../top-nav/top-nav.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'tb-board',
|
selector: 'tb-board',
|
||||||
templateUrl: 'app/board/board.component.html'
|
templateUrl: 'app/board/board.component.html',
|
||||||
|
directives: [ TopNav ]
|
||||||
})
|
})
|
||||||
export class Board {
|
export class Board {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="login">
|
<div class="login">
|
||||||
<h1>TaskBoard</h1>
|
<h1>TaskBoard</h1>
|
||||||
<input type="text" placeholder="Username" title="Username">
|
<input type="text" placeholder="Username" title="Username" autofocus>
|
||||||
<input type="password" placeholder="Password" title="Password">
|
<input type="password" placeholder="Password" title="Password">
|
||||||
<label><input type="checkbox"> Remember Me</label>
|
<label><input type="checkbox"> Remember Me</label>
|
||||||
<button>Sign In</button>
|
<button>Sign In</button>
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import { bootstrap } from '@angular/platform-browser-dynamic';
|
import { bootstrap } from '@angular/platform-browser-dynamic';
|
||||||
// import { ROUTER_PROVIDERS } from '@angular/router';
|
|
||||||
import { HTTP_PROVIDERS } from '@angular/http';
|
import { HTTP_PROVIDERS } from '@angular/http';
|
||||||
//import { enableProdMode } from '@angular/core';
|
//import { enableProdMode } from '@angular/core';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
import { APP_ROUTER_PROVIDERS } from './app.routes';
|
||||||
import { Constants } from './app.constants';
|
import { Constants } from './app.constants';
|
||||||
|
|
||||||
//enableProdMode();
|
//enableProdMode();
|
||||||
|
|
||||||
bootstrap(AppComponent, [
|
bootstrap(AppComponent, [
|
||||||
// ROUTER_PROVIDERS,
|
|
||||||
HTTP_PROVIDERS,
|
HTTP_PROVIDERS,
|
||||||
|
APP_ROUTER_PROVIDERS,
|
||||||
Constants
|
Constants
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>TaskBoard</title>
|
<title>TaskBoard</title>
|
||||||
<base href="/dist/">
|
<base href="/web/TaskBoard/dist/">
|
||||||
|
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
Reference in New Issue
Block a user