refactor(router): take advantage of the new way of configuring modules

This commit is contained in:
vsavkin
2016-07-27 09:54:19 -07:00
parent ba88db5141
commit 9d9e9c6ff1
11 changed files with 83 additions and 71 deletions

View File

@ -7,7 +7,7 @@
*/
import {Component, Injectable} from '@angular/core';
import {ROUTER_DIRECTIVES, ActivatedRoute, Router} from '@angular/router';
import {ActivatedRoute, Router} from '@angular/router';
import * as db from './data';
import {Location} from '@angular/common';
import {PromiseWrapper, PromiseCompleter} from '@angular/core/src/facade/async';
@ -89,7 +89,7 @@ export class DbService {
}
}
@Component({selector: 'inbox', templateUrl: 'app/inbox.html', directives: ROUTER_DIRECTIVES})
@Component({selector: 'inbox', templateUrl: 'app/inbox.html'})
export class InboxCmp {
private items: InboxRecord[] = [];
private ready: boolean = false;
@ -116,7 +116,7 @@ export class InboxCmp {
}
@Component({selector: 'drafts', templateUrl: 'app/drafts.html', directives: ROUTER_DIRECTIVES})
@Component({selector: 'drafts', templateUrl: 'app/drafts.html'})
export class DraftsCmp {
private items: InboxRecord[] = [];
private ready: boolean = false;
@ -138,8 +138,6 @@ export const ROUTER_CONFIG = [
@Component({
selector: 'inbox-app',
viewProviders: [DbService],
templateUrl: 'app/inbox-app.html',
directives: ROUTER_DIRECTIVES
templateUrl: 'app/inbox-app.html'
})
export class InboxApp {}