Skip to content

Instantly share code, notes, and snippets.

@krimple
Created December 28, 2015 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krimple/91189eb7a602996ca09c to your computer and use it in GitHub Desktop.
Save krimple/91189eb7a602996ca09c to your computer and use it in GitHub Desktop.
Routing problem - sample code
import {Component} from "angular2/core";
import {CORE_DIRECTIVES} from "angular2/common";
import {BlogRoll} from "../blog/blogroll";
import {BlogEditor} from "../blog-editor/blog-editor";
import {
RouterLink,
ROUTER_DIRECTIVES,
RouteConfig,
Route,
RouterOutlet,
Location,
RouteParams
} from 'angular2/router';
@Component({
selector: 'app-shell',
template: `
<div class="pure-menu pure-menu-horizontal">
<span class="pure-menu-heading">Simple Router Demo</span>
<ul class="pure-menu-list">
<li class="pure-menu-item"><a class="pure-menu-link" [routerLink]="['BlogRoll']">Blog Roll</a></li>
<li class="pure-menu-item"><a class="pure-menu-link" [routerLink]="['BlogEditor']">Blog Editor</a></li>
</ul>
</div>
<router-outlet></router-outlet>
`,
directives: [CORE_DIRECTIVES, ROUTER_DIRECTIVES]
})
@RouteConfig([
new Route({ path: '/blogroll', component: BlogRoll, name: 'BlogRoll', useAsDefault: true}),
new Route({ path: '/blogeditor', component: BlogEditor, name: 'BlogEditor'}),
new Route({ path: '/blogeditor/:id', component: BlogEditor, name: 'BlogEditorById'})
])
export class AppShell {
}
import {AppShell} from './app-shell/app-shell';
import {bootstrap} from "angular2/platform/browser";
import {HTTP_PROVIDERS} from "angular2/http";
import {ROUTER_PROVIDERS} from 'angular2/router';
bootstrap(AppShell, [HTTP_PROVIDERS, ROUTER_PROVIDERS]);
import {Component} from "angular2/core";
@Component({
template: `
TODO - will be editor
`
})
export class BlogEditor {
}
export class BlogEntry {
id: number;
title: string;
content: string;
constructor(title:string, content:string) {
this.title = title;
this.content = content;
}
static asBlogEntries(jsonArray: Array<Object>) {
return jsonArray.map((datum) => BlogEntry.asBlogEntry(datum));
}
static asBlogEntry(json: any) {
var title: string = json['title'];
var content: string = json['content'];
return new BlogEntry(title, content);
}
}
import {Response} from 'angular2/http';
import {Http} from 'angular2/http';
import {Observable} from 'rxjs/Observable';
import {Inject} from 'angular2/core';
import {Injectable} from 'angular2/core';
import {BlogEntry} from '../domain/blog-entry';
@Injectable()
export class BlogService {
constructor(private http: Http) {}
getBlogs(): Observable<any> {
return this.http.get("/api/blogs")
.map((res: Response) => { return BlogEntry.asBlogEntries(res.json()) });
}
}
import {Component} from 'angular2/core';
import {CORE_DIRECTIVES} from 'angular2/common';
import {BlogEntry} from '../domain/blog-entry.ts';
import {BlogService} from '../services/blog-service';
import 'rxjs/add/operator/map';
import {Router} from "angular2/router";
@Component({
bindings: [BlogService, Router],
template: `
<div class="pure-g">
<div class="pure-u-1-24"></div>
<div class="pure-u-23-24" *ngFor="#blog of blogs">
<h3>{{ blog.title }}</h3>
<div (click)="editBlogEntry(blog)">Click to edit...</div>
<div [innerHtml]="blog.content"></div>
</div>
<div class="pure-u-1-24"></div>
</div>
`,
selector: 'blog-roll',
directives: [CORE_DIRECTIVES]
})
export class BlogRoll {
blogs:Array<BlogEntry>;
blogService: BlogService;
router: Router;
constructor(blogService:BlogService, router: Router) {
blogService.getBlogs().subscribe(
(data:Array<BlogEntry>) => {
console.log('data is', data);
this.blogs = data;
},
(error:Object) => {
console.log('error!', error);
}
);
}
editBlogEntry(blog: BlogEntry) {
this.router.navigate(['BlogEditorById', { id: blog.id }]);
}
}
angular2.dev.js:23514 EXCEPTION: Cannot resolve all parameters for Router(?, ?, ?). Make sure they all have valid type or annotations.BrowserDomAdapter.logError @ angular2.dev.js:23514BrowserDomAdapter.logGroup @ angular2.dev.js:23525ExceptionHandler.call @ angular2.dev.js:1145(anonymous function) @ angular2.dev.js:14801NgZone._notifyOnError @ angular2.dev.js:5796collection_1.StringMapWrapper.merge.onError @ angular2.dev.js:5700run @ angular2-polyfills.js:141(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243microtask @ angular2.dev.js:5751run @ angular2-polyfills.js:138(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305
angular2.dev.js:23514 STACKTRACE:BrowserDomAdapter.logError @ angular2.dev.js:23514ExceptionHandler.call @ angular2.dev.js:1147(anonymous function) @ angular2.dev.js:14801NgZone._notifyOnError @ angular2.dev.js:5796collection_1.StringMapWrapper.merge.onError @ angular2.dev.js:5700run @ angular2-polyfills.js:141(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243microtask @ angular2.dev.js:5751run @ angular2-polyfills.js:138(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305
angular2.dev.js:23514 Error: Cannot resolve all parameters for Router(?, ?, ?). Make sure they all have valid type or annotations.
at NoAnnotationError.BaseException [as constructor] (http://localhost:3000/lib/angular2.dev.js:8080:21)
at new NoAnnotationError (http://localhost:3000/lib/angular2.dev.js:1698:14)
at _dependenciesFor (http://localhost:3000/lib/angular2.dev.js:10353:13)
at resolveFactory (http://localhost:3000/lib/angular2.dev.js:10253:22)
at _normalizeProvider (http://localhost:3000/lib/angular2.dev.js:10317:19)
at http://localhost:3000/lib/angular2.dev.js:10302:9
at Array.forEach (native)
at _normalizeProviders (http://localhost:3000/lib/angular2.dev.js:10300:15)
at Object.resolveProviders (http://localhost:3000/lib/angular2.dev.js:10276:45)
at Function.Injector.resolve (http://localhost:3000/lib/angular2.dev.js:11784:25)
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at Zone.bind (http://localhost:3000/lib/angular2-polyfills.js:109:48)
at bindArguments (http://localhost:3000/lib/angular2-polyfills.js:980:29)
at lib$es6$promise$promise$$Promise.obj.(anonymous function) [as then] (http://localhost:3000/lib/angular2-polyfills.js:1000:37)
at DynamicComponentLoader_.loadNextToLocation (http://localhost:3000/lib/angular2.dev.js:14554:49)
at RouterOutlet.activate (http://localhost:3000/lib/router.dev.js:1898:27)
at http://localhost:3000/lib/router.dev.js:2718:34
at Zone.run (http://localhost:3000/lib/angular2-polyfills.js:138:17)
at Zone.run (http://localhost:3000/lib/angular2.dev.js:5719:32)
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at Zone.bind (http://localhost:3000/lib/angular2-polyfills.js:109:48)
at bindArguments (http://localhost:3000/lib/angular2-polyfills.js:980:29)
at lib$es6$promise$promise$$Promise.obj.(anonymous function) [as then] (http://localhost:3000/lib/angular2-polyfills.js:1000:37)
at RootRouter.Router.commit (http://localhost:3000/lib/router.dev.js:2717:47)
at RootRouter.commit (http://localhost:3000/lib/router.dev.js:2833:45)
at http://localhost:3000/lib/router.dev.js:2627:26
at Zone.run (http://localhost:3000/lib/angular2-polyfills.js:138:17)
at Zone.run (http://localhost:3000/lib/angular2.dev.js:5719:32)
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at Zone.bind (http://localhost:3000/lib/angular2-polyfills.js:109:48)
at bindArguments (http://localhost:3000/lib/angular2-polyfills.js:980:29)
at lib$es6$promise$promise$$Promise.obj.(anonymous function) [as then] (http://localhost:3000/lib/angular2-polyfills.js:1000:37)
at http://localhost:3000/lib/router.dev.js:2625:56
at Zone.run (http://localhost:3000/lib/angular2-polyfills.js:138:17)
at Zone.run (http://localhost:3000/lib/angular2.dev.js:5719:32)
at zoneBoundFn (http://localhost:3000/lib/angular2-polyfills.js:111:19)
at lib$es6$promise$$internal$$tryCatch (http://localhost:3000/lib/angular2-polyfills.js:1511:16)
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at Zone.bind (http://localhost:3000/lib/angular2-polyfills.js:109:48)
at bindArguments (http://localhost:3000/lib/angular2-polyfills.js:980:29)
at lib$es6$promise$promise$$Promise.obj.(anonymous function) [as then] (http://localhost:3000/lib/angular2-polyfills.js:1000:37)
at RootRouter.Router._navigate (http://localhost:3000/lib/router.dev.js:2621:10)
at http://localhost:3000/lib/router.dev.js:2598:24
at Zone.run (http://localhost:3000/lib/angular2-polyfills.js:138:17)
at Zone.run (http://localhost:3000/lib/angular2.dev.js:5719:32)
at zoneBoundFn (http://localhost:3000/lib/angular2-polyfills.js:111:19)
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at Zone.bind (http://localhost:3000/lib/angular2-polyfills.js:109:48)
at bindArguments (http://localhost:3000/lib/angular2-polyfills.js:980:29)
at lib$es6$promise$promise$$Promise.obj.(anonymous function) [as then] (http://localhost:3000/lib/angular2-polyfills.js:1000:37)
at http://localhost:3000/lib/router.dev.js:2594:73
at Zone.run (http://localhost:3000/lib/angular2-polyfills.js:138:17)
at Zone.run (http://localhost:3000/lib/angular2.dev.js:5719:32)
at zoneBoundFn (http://localhost:3000/lib/angular2-polyfills.js:111:19)
at lib$es6$promise$$internal$$tryCatch (http://localhost:3000/lib/angular2-polyfills.js:1511:16)
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at Zone.bind (http://localhost:3000/lib/angular2-polyfills.js:109:48)
at bindArguments (http://localhost:3000/lib/angular2-polyfills.js:980:29)
at lib$es6$promise$promise$$Promise.obj.(anonymous function) [as then] (http://localhost:3000/lib/angular2-polyfills.js:1000:37)
at RootRouter.Router.navigateByUrl (http://localhost:3000/lib/router.dev.js:2591:64)
at new RootRouter (http://localhost:3000/lib/router.dev.js:2821:12)
at routerFactory (http://localhost:3000/lib/router.dev.js:2956:22)
at Injector._instantiate (http://localhost:3000/lib/angular2.dev.js:11929:19)
at Injector._instantiateProvider (http://localhost:3000/lib/angular2.dev.js:11859:21)
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at Zone.bind (http://localhost:3000/lib/angular2-polyfills.js:109:48)
at bindArguments (http://localhost:3000/lib/angular2-polyfills.js:980:29)
at lib$es6$promise$promise$$Promise.obj.(anonymous function) [as then] (http://localhost:3000/lib/angular2-polyfills.js:1000:37)
at DynamicComponentLoader_.loadAsRoot (http://localhost:3000/lib/angular2.dev.js:14530:49)
at di_1.provide.useFactory (http://localhost:3000/lib/angular2.dev.js:14672:39)
at Injector._instantiate (http://localhost:3000/lib/angular2.dev.js:11926:19)
at Injector._instantiateProvider (http://localhost:3000/lib/angular2.dev.js:11859:21)
at Injector._new (http://localhost:3000/lib/angular2.dev.js:11849:19)
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at NgZone._createInnerZone (http://localhost:3000/lib/angular2.dev.js:5707:39)
at new NgZone (http://localhost:3000/lib/angular2.dev.js:5573:32)
at createNgZone (http://localhost:3000/lib/angular2.dev.js:14693:12)
at PlatformRef_.application (http://localhost:3000/lib/angular2.dev.js:14768:31)
at Object.bootstrap (http://localhost:3000/lib/angular2.dev.js:25054:64)
at execute (http://localhost:3000/app/app.js:18:23)
at u (http://localhost:3000/lib/system.js:5:97)
at Object.execute (http://localhost:3000/lib/system.js:5:3188)BrowserDomAdapter.logError @ angular2.dev.js:23514ExceptionHandler.call @ angular2.dev.js:1148(anonymous function) @ angular2.dev.js:14801NgZone._notifyOnError @ angular2.dev.js:5796collection_1.StringMapWrapper.merge.onError @ angular2.dev.js:5700run @ angular2-polyfills.js:141(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243microtask @ angular2.dev.js:5751run @ angular2-polyfills.js:138(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305
angular2.dev.js:23524 EXCEPTION: Cannot resolve all parameters for Router(?, ?, ?). Make sure they all have valid type or annotations.
angular2.dev.js:23514 EXCEPTION: Cannot resolve all parameters for Router(?, ?, ?). Make sure they all have valid type or annotations.BrowserDomAdapter.logError @ angular2.dev.js:23514BrowserDomAdapter.logGroup @ angular2.dev.js:23525ExceptionHandler.call @ angular2.dev.js:1145(anonymous function) @ angular2.dev.js:14801NgZone._notifyOnError @ angular2.dev.js:5796collection_1.StringMapWrapper.merge.onError @ angular2.dev.js:5700run @ angular2-polyfills.js:141(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111run @ angular2-polyfills.js:138(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494lib$es6$promise$$internal$$publishRejection @ angular2-polyfills.js:1444(anonymous function) @ angular2-polyfills.js:243microtask @ angular2.dev.js:5751run @ angular2-polyfills.js:138(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305
angular2.dev.js:23514 STACKTRACE:BrowserDomAdapter.logError @ angular2.dev.js:23514ExceptionHandler.call @ angular2.dev.js:1147(anonymous function) @ angular2.dev.js:14801NgZone._notifyOnError @ angular2.dev.js:5796collection_1.StringMapWrapper.merge.onError @ angular2.dev.js:5700run @ angular2-polyfills.js:141(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111run @ angular2-polyfills.js:138(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494lib$es6$promise$$internal$$publishRejection @ angular2-polyfills.js:1444(anonymous function) @ angular2-polyfills.js:243microtask @ angular2.dev.js:5751run @ angular2-polyfills.js:138(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305
angular2.dev.js:23514 Error: Cannot resolve all parameters for Router(?, ?, ?). Make sure they all have valid type or annotations.
at NoAnnotationError.BaseException [as constructor] (http://localhost:3000/lib/angular2.dev.js:8080:21)
at new NoAnnotationError (http://localhost:3000/lib/angular2.dev.js:1698:14)
at _dependenciesFor (http://localhost:3000/lib/angular2.dev.js:10353:13)
at resolveFactory (http://localhost:3000/lib/angular2.dev.js:10253:22)
at _normalizeProvider (http://localhost:3000/lib/angular2.dev.js:10317:19)
at http://localhost:3000/lib/angular2.dev.js:10302:9
at Array.forEach (native)
at _normalizeProviders (http://localhost:3000/lib/angular2.dev.js:10300:15)
at Object.resolveProviders (http://localhost:3000/lib/angular2.dev.js:10276:45)
at Function.Injector.resolve (http://localhost:3000/lib/angular2.dev.js:11784:25)
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at Zone.bind (http://localhost:3000/lib/angular2-polyfills.js:109:48)
at bindArguments (http://localhost:3000/lib/angular2-polyfills.js:980:29)
at lib$es6$promise$promise$$Promise.obj.(anonymous function) [as catch] (http://localhost:3000/lib/angular2-polyfills.js:1000:37)
at Function.PromiseWrapper.catchError (http://localhost:3000/lib/angular2.dev.js:5499:27)
at RootRouter.Router._afterPromiseFinishNavigating (http://localhost:3000/lib/router.dev.js:2654:37)
at http://localhost:3000/lib/router.dev.js:2594:22
at Zone.run (http://localhost:3000/lib/angular2-polyfills.js:138:17)
at Zone.run (http://localhost:3000/lib/angular2.dev.js:5719:32)
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at Zone.bind (http://localhost:3000/lib/angular2-polyfills.js:109:48)
at bindArguments (http://localhost:3000/lib/angular2-polyfills.js:980:29)
at lib$es6$promise$promise$$Promise.obj.(anonymous function) [as then] (http://localhost:3000/lib/angular2-polyfills.js:1000:37)
at RootRouter.Router.navigateByUrl (http://localhost:3000/lib/router.dev.js:2591:64)
at new RootRouter (http://localhost:3000/lib/router.dev.js:2821:12)
at routerFactory (http://localhost:3000/lib/router.dev.js:2956:22)
at Injector._instantiate (http://localhost:3000/lib/angular2.dev.js:11929:19)
at Injector._instantiateProvider (http://localhost:3000/lib/angular2.dev.js:11859:21)
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at Zone.bind (http://localhost:3000/lib/angular2-polyfills.js:109:48)
at bindArguments (http://localhost:3000/lib/angular2-polyfills.js:980:29)
at lib$es6$promise$promise$$Promise.obj.(anonymous function) [as then] (http://localhost:3000/lib/angular2-polyfills.js:1000:37)
at DynamicComponentLoader_.loadAsRoot (http://localhost:3000/lib/angular2.dev.js:14530:49)
at di_1.provide.useFactory (http://localhost:3000/lib/angular2.dev.js:14672:39)
at Injector._instantiate (http://localhost:3000/lib/angular2.dev.js:11926:19)
at Injector._instantiateProvider (http://localhost:3000/lib/angular2.dev.js:11859:21)
at Injector._new (http://localhost:3000/lib/angular2.dev.js:11849:19)
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at NgZone._createInnerZone (http://localhost:3000/lib/angular2.dev.js:5707:39)
at new NgZone (http://localhost:3000/lib/angular2.dev.js:5573:32)
at createNgZone (http://localhost:3000/lib/angular2.dev.js:14693:12)
at PlatformRef_.application (http://localhost:3000/lib/angular2.dev.js:14768:31)
at Object.bootstrap (http://localhost:3000/lib/angular2.dev.js:25054:64)
at execute (http://localhost:3000/app/app.js:18:23)
at u (http://localhost:3000/lib/system.js:5:97)
at Object.execute (http://localhost:3000/lib/system.js:5:3188)BrowserDomAdapter.logError @ angular2.dev.js:23514ExceptionHandler.call @ angular2.dev.js:1148(anonymous function) @ angular2.dev.js:14801NgZone._notifyOnError @ angular2.dev.js:5796collection_1.StringMapWrapper.merge.onError @ angular2.dev.js:5700run @ angular2-polyfills.js:141(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111run @ angular2-polyfills.js:138(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494lib$es6$promise$$internal$$publishRejection @ angular2-polyfills.js:1444(anonymous function) @ angular2-polyfills.js:243microtask @ angular2.dev.js:5751run @ angular2-polyfills.js:138(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305
angular2.dev.js:23524 EXCEPTION: Cannot resolve all parameters for Router(?, ?, ?). Make sure they all have valid type or annotations.
angular2.dev.js:23514 EXCEPTION: Cannot resolve all parameters for Router(?, ?, ?). Make sure they all have valid type or annotations.BrowserDomAdapter.logError @ angular2.dev.js:23514BrowserDomAdapter.logGroup @ angular2.dev.js:23525ExceptionHandler.call @ angular2.dev.js:1145(anonymous function) @ angular2.dev.js:14801NgZone._notifyOnError @ angular2.dev.js:5796collection_1.StringMapWrapper.merge.onError @ angular2.dev.js:5700run @ angular2-polyfills.js:141(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494lib$es6$promise$$internal$$publishRejection @ angular2-polyfills.js:1444(anonymous function) @ angular2-polyfills.js:243microtask @ angular2.dev.js:5751run @ angular2-polyfills.js:138(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305
angular2.dev.js:23514 STACKTRACE:BrowserDomAdapter.logError @ angular2.dev.js:23514ExceptionHandler.call @ angular2.dev.js:1147(anonymous function) @ angular2.dev.js:14801NgZone._notifyOnError @ angular2.dev.js:5796collection_1.StringMapWrapper.merge.onError @ angular2.dev.js:5700run @ angular2-polyfills.js:141(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494lib$es6$promise$$internal$$publishRejection @ angular2-polyfills.js:1444(anonymous function) @ angular2-polyfills.js:243microtask @ angular2.dev.js:5751run @ angular2-polyfills.js:138(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305
angular2.dev.js:23514 Error: Cannot resolve all parameters for Router(?, ?, ?). Make sure they all have valid type or annotations.
at NoAnnotationError.BaseException [as constructor] (http://localhost:3000/lib/angular2.dev.js:8080:21)
at new NoAnnotationError (http://localhost:3000/lib/angular2.dev.js:1698:14)
at _dependenciesFor (http://localhost:3000/lib/angular2.dev.js:10353:13)
at resolveFactory (http://localhost:3000/lib/angular2.dev.js:10253:22)
at _normalizeProvider (http://localhost:3000/lib/angular2.dev.js:10317:19)
at http://localhost:3000/lib/angular2.dev.js:10302:9
at Array.forEach (native)
at _normalizeProviders (http://localhost:3000/lib/angular2.dev.js:10300:15)
at Object.resolveProviders (http://localhost:3000/lib/angular2.dev.js:10276:45)
at Function.Injector.resolve (http://localhost:3000/lib/angular2.dev.js:11784:25)
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at Zone.bind (http://localhost:3000/lib/angular2-polyfills.js:109:48)
at bindArguments (http://localhost:3000/lib/angular2-polyfills.js:980:29)
at lib$es6$promise$promise$$Promise.obj.(anonymous function) [as then] (http://localhost:3000/lib/angular2-polyfills.js:1000:37)
at lib$es6$promise$promise$$Promise.catch (http://localhost:3000/lib/angular2-polyfills.js:2108:21)
at lib$es6$promise$promise$$Promise.obj.(anonymous function) [as catch] (http://localhost:3000/lib/angular2-polyfills.js:1000:25)
at Function.PromiseWrapper.catchError (http://localhost:3000/lib/angular2.dev.js:5499:27)
at RootRouter.Router._afterPromiseFinishNavigating (http://localhost:3000/lib/router.dev.js:2654:37)
at http://localhost:3000/lib/router.dev.js:2594:22
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at Zone.bind (http://localhost:3000/lib/angular2-polyfills.js:109:48)
at bindArguments (http://localhost:3000/lib/angular2-polyfills.js:980:29)
at lib$es6$promise$promise$$Promise.obj.(anonymous function) [as then] (http://localhost:3000/lib/angular2-polyfills.js:1000:37)
at RootRouter.Router.navigateByUrl (http://localhost:3000/lib/router.dev.js:2591:64)
at new RootRouter (http://localhost:3000/lib/router.dev.js:2821:12)
at routerFactory (http://localhost:3000/lib/router.dev.js:2956:22)
at Injector._instantiate (http://localhost:3000/lib/angular2.dev.js:11929:19)
at Injector._instantiateProvider (http://localhost:3000/lib/angular2.dev.js:11859:21)
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at Zone.bind (http://localhost:3000/lib/angular2-polyfills.js:109:48)
at bindArguments (http://localhost:3000/lib/angular2-polyfills.js:980:29)
at lib$es6$promise$promise$$Promise.obj.(anonymous function) [as then] (http://localhost:3000/lib/angular2-polyfills.js:1000:37)
at DynamicComponentLoader_.loadAsRoot (http://localhost:3000/lib/angular2.dev.js:14530:49)
at di_1.provide.useFactory (http://localhost:3000/lib/angular2.dev.js:14672:39)
at Injector._instantiate (http://localhost:3000/lib/angular2.dev.js:11926:19)
at Injector._instantiateProvider (http://localhost:3000/lib/angular2.dev.js:11859:21)
at Injector._new (http://localhost:3000/lib/angular2.dev.js:11849:19)
-----async gap-----
Error
at _getStacktraceWithUncaughtError (http://localhost:3000/lib/angular2-polyfills.js:2195:26)
at Zone.fork (http://localhost:3000/lib/angular2-polyfills.js:2253:40)
at NgZone._createInnerZone (http://localhost:3000/lib/angular2.dev.js:5707:39)
at new NgZone (http://localhost:3000/lib/angular2.dev.js:5573:32)
at createNgZone (http://localhost:3000/lib/angular2.dev.js:14693:12)
at PlatformRef_.application (http://localhost:3000/lib/angular2.dev.js:14768:31)
at Object.bootstrap (http://localhost:3000/lib/angular2.dev.js:25054:64)
at execute (http://localhost:3000/app/app.js:18:23)
at u (http://localhost:3000/lib/system.js:5:97)
at Object.execute (http://localhost:3000/lib/system.js:5:3188)BrowserDomAdapter.logError @ angular2.dev.js:23514ExceptionHandler.call @ angular2.dev.js:1148(anonymous function) @ angular2.dev.js:14801NgZone._notifyOnError @ angular2.dev.js:5796collection_1.StringMapWrapper.merge.onError @ angular2.dev.js:5700run @ angular2-polyfills.js:141(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494lib$es6$promise$$internal$$publishRejection @ angular2-polyfills.js:1444(anonymous function) @ angular2-polyfills.js:243microtask @ angular2.dev.js:5751run @ angular2-polyfills.js:138(anonymous function) @ angular2.dev.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment