Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 1 | /// <reference path="../../typings/index.d.ts"/> |
| 2 | |
| 3 | import {Component} from '@angular/core'; |
| 4 | import {RouterModule, Routes} from '@angular/router'; |
| 5 | import {HelloComponent} from './hello'; |
Matteo Scandolo | 5e5c12b | 2016-12-05 16:17:52 -0800 | [diff] [blame] | 6 | import {LoginComponent} from './components/login/login.component'; |
Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 7 | |
| 8 | @Component({ |
Matteo Scandolo | 43ffb67 | 2016-12-02 14:49:58 -0800 | [diff] [blame] | 9 | selector: 'xos-root', |
| 10 | template: ` |
| 11 | <router-outlet></router-outlet> |
| 12 | ` |
Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 13 | }) |
| 14 | export class RootComponent {} |
| 15 | |
| 16 | export const routes: Routes = [ |
| 17 | { |
| 18 | path: '', |
| 19 | component: HelloComponent |
Matteo Scandolo | 43ffb67 | 2016-12-02 14:49:58 -0800 | [diff] [blame] | 20 | }, |
| 21 | { |
| 22 | path: 'login', |
| 23 | component: LoginComponent |
Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 24 | } |
| 25 | ]; |
| 26 | |
| 27 | export const routing = RouterModule.forRoot(routes); |