petebacondarwin / ng1-component-router-demo

MIT License
30 stars 9 forks source link

Error: Component "Root" has no route config. #10

Open yellow1912 opened 8 years ago

yellow1912 commented 8 years ago

I keep getting this issue when running the demo app. I double checked several times to make sure I'm using the router js from this demo package but the error is still there?

Perhaps the router is not ready yet and I should stick to angular ui router for now?

bobwah commented 8 years ago

+1

andrei-ivanovici commented 8 years ago

Hi, Guys. If I use the file provided in the repo, it works fine for me. I've pulled the latest code, ran npm install, downloaded the file from the repo again and copied it in "ng1-component-router-demo\node_modules\@angular\router\angular1" ran "npm start", and everything seems to work as expected. The sha1 of the angular_1_router file in this repo is febf631bc77afdcd8135e5733c761f2dd2b86ba8 . Make sure yours is the same

ArniDzhan commented 8 years ago

I can confirm having the same issue, it can be solved by replacing both files to the states they are in repo:

https://github.com/petebacondarwin/ng1-component-router-demo/blob/master/node_modules/%40angular/router/angular1/angular_1_router.js

https://github.com/petebacondarwin/ng1-component-router-demo/blob/master/node_modules/angular/angular.js

ArniDzhan commented 8 years ago

I am not sure what exactly is causing it but anyway shortcut installation commands would be npm install git reset --hard HEAD npm start

andrei-ivanovici commented 8 years ago

@ArniDzhan when you're running npm install, the angular_router in the repo is being replaced by the one from npm which is not the correct version yet :). The latest and greatest version of the router will be published soon, and when that happens, these steps will not be needed

:+1: for your temporary solution