javascript - Angular html5 mode. href causing full page redirect -
javascript - Angular html5 mode. href causing full page redirect -
i using angular html5 mode , noticing issue anchor tags href set. if on root ('/'), , click on anchor of form
<a href="/entity/233b430e-ef50-4405-b46a-d7de5c235d4a">entity 1</a>
(so no target's etc!) cause page redirect, instead of inserting template ng-view.
it works fine if utilize $location
provider, or set html5mode false.
i not understand doing wrong?
here illustration of route above
$routeprovider . . . .when('/entity/:id', { templateurl: function (params) { homecoming '/entity/view/' + params.id; }, resolve: { entityobj: ['$route', 'entityservice', function ($route, entityservice) { var id = $route.current.params.id; homecoming entityservice.getentity(id); }] }, controller: 'entityviewctrl', caseinsensitivematch: true }) . . .
javascript html5 angularjs
Comments
Post a Comment