Closed untied closed 11 years ago
Hi,
internally we are using angular's routes also for the default case, i.e. an url of #page1
will load the internal div with id page1
. For this, we use $routeProvider.otherwise
.
Custom routes are nice if you want to use the same page for multiple urls with parameters, e.g.
/user/1
and /user/2
which should all use the template from #userPage
.
However, if you are not using url parameters, then you can stick to the default routing, you are right.
Tobias
Hope this helped. Closing this.
Hello. Can you please clarify one moment about declaring routes?
What is the use of declaring AngularJS routes, like:
since we still have the common jQuery Mobile hash-oriented navigation, like: ???This hash-oriented navigation operates without any relation to AngularJS routes, it is impossible to employ views (directive ng-view) and controllers... So what is the idea of declaring routes if navigation works without such a declaration?
Or maybe I've missed something important?