Question

I installed the generator-angular with yeoman:

Inside the bower.json I see this dependency which I also agreed to install.

but now I see I do need the angular ui router not the default angular-route.

Is this the angular core routing?

If yes why can it be installed extra?

If no what is this angular-route then? Googling it gives nothing unique...

"angular-route": "1.2.6",

Was it helpful?

Solution 2

That would be the bower package to install the ngRoute module. The source is found at:

https://github.com/angular/bower-angular-route

OTHER TIPS

with bower:

bower install --save angular-route

in the main page :

<script src="/bower_components/angular-route/angular-route.js"></script>

in your app:

angular.module('myApp', ['ngRoute']);

its all!

if you want more automatic import, you can install wiredep, wiredep injects yours dependencies into your source code, reading the bower.json file in this case.

At a Windows cmd prompt:

> cd <path to your project>
> bower install angular-route

Bower will download to:

<path to your project>\bower_components\angular-route

And you can reference in your .html file via relative path:

<script src="bower_components/angular-route/angular-route.js"></script>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top