This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

url contain '%2F' instead of '/' (#1381)

Starting with Angular v.1.6.0, the default hash-prefix used for $location hash-bang URLs has changed from the empty string ('') to the bang ('!').
This means that the links from an app created with "yo angular" won't work, since Angular ^1.4.0 will resolve to angular 1.6.0 or newer.
I believe most people prefer to keep the # symbol instead of #!
  • Loading branch information...
mikela authored and eddiemonge committed Apr 5, 2017
1 parent 461640d commit 019c99702fd8b87043b12012da0c6bf59e5b4771
Showing with 3 additions and 1 deletion.
  1. +3 −1 templates/javascript/app.js
@@ -10,7 +10,7 @@
*/
angular
.module('<%= scriptAppName %>', [<%= angularModules %>])<% if (ngRoute) { %>
.config(function ($routeProvider) {
.config(function ($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/main.html',
@@ -20,4 +20,6 @@ angular
.otherwise({
redirectTo: '/'
});
$locationProvider.hashPrefix('');
})<% } %>;

1 comment on commit 019c997

@kiplphp78

This comment has been minimized.

Show comment
Hide comment
@kiplphp78

kiplphp78 Jun 29, 2017

Still got this error

kiplphp78 commented on 019c997 Jun 29, 2017

Still got this error

Please sign in to comment.