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