angular - Only instances of Provider and Type are allowed, got: [object Object] -
this configuration in package.json:
"dependencies": { "@angular/common": "2.0.0-rc.4", "@angular/compiler": "2.0.0-rc.4", "@angular/core": "2.0.0-rc.4", "@angular/http": "2.0.0-rc.4", "@angular/platform-browser": "2.0.0-rc.4", "@angular/platform-browser-dynamic": "2.0.0-rc.4", "@angular/platform-server": "2.0.0-rc.4", "@angular/router": "3.0.0-beta.1", "angular2-universal": "^0.104.5", "aspnet-prerendering": "^1.0.2", "css": "^2.2.1", "es6-shim": "^0.35.1", "isomorphic-fetch": "^2.2.1", "preboot": "^2.0.10", "rxjs": "5.0.0-beta.6", "webpack-externals-plugin": "^1.0.0", "zone.js": "^0.6.12" }
and code:
bootstrap(app, [ ...http_providers, formbuilder, authguard, authenticationservice, providerouter(routes) ]);
and error "only instances of provider , type allowed, got: [object object]". mean? error?
the error seems in providerouter(routes) part.
export const routes: routerconfig = [ { path: 'login', component: logincomponent }, { path: '', component: homecomponent, canactivate: [authguard] }, { path: 'counter', component: counter }, { path: 'fetch-data', component: fetchdata }, { path: '**', redirectto: '' } ];
this definition of routes.
Comments
Post a Comment