This question seems a bit "IdidntwanttosearchonGoogle" but I did. A lot, and anything worked.
I'm trying to build a little web app with angular 1.5. The problem is that I never used route (NEVER !), and Angular 1.5 seems ambiguous about it. I've seen that 1.5 uses Component Router like Angular 2, then on the Angular page it says that it is deprecated and we have to use ngRoute.
The fact is that anyway, I don't manage to understand which to take and how to use it. Tried this in my bower.json :
{
"name": "doit"
"dependencies": {
"angular": "1.5.8",
"angular-component-router": "0.2.0"
}
}
And in my index.html :
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.3/css/bootstrap.min.css" integrity="sha384-MIwDKRSSImVFAZCVLtU0LMDdON6KVCrZHyVQQj6e8wIEJkW4tvwqXrbMIya1vriY" crossorigin="anonymous">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>DoIt Application</title>
<!-- SCRIPT DE CONNEXION -->
<script src="bower_components/angular/angular.js"></script>
<script src="bootstrap.js"></script>
<script src="app/app.component.js"></script>
<script src="bower_components/angular-component-router/angular_1_router.js"></script>
<script src="bower_components/angular-component-router/ng_route_shim.js"></script>
</head>
<body ng-app="app">
<my-app></my-app>
</body>
</html>
If you have a guide that explain routes in Angular 1.5 correctly, who works, It would be perfect !
Are you specifically wanting to use the Angular 1.5 router or are you asking for suggestions on which router library to use?
Personally if you are not strict on using the Angular router, I would recommend using ui-router, it has become almost a standard in angular apps anyway.
Things I like about it:
https://github.com/angular-ui/ui-router
Put this in your bower.json:
Put this in your app:
EDIT:
So if you wish to use the component routing, you can fake it in 0.3.
However if you want full component routing then 1.0 alpha is the one to use.
Check this github issue link for more info:
https://github.com/angular-ui/ui-router/issues/2793