javascript - AngularJS won't let me load another page -
i want have link goes page , nothing has visible effect on page. have tried:
<a href="url">
<a href="url" target="_self">
<a ng-click="register()">
where register controller function, function bodies i've tried:
$window.location.href(url)
$window.location.href = url
$window.location = url
all followed $window.location.reload()
(which not refresh page after failing change url). every single method accepted valid answer other people asking same question. using angular 1.2 old.
edit: sorry not beign more specific avoid confusion; url placeholder inline string , elements closed properly. trying list methods i've seen other pages on site (which failed). in html5mode $location.
this how it. in html:
<a href="javascript:" ng-click="register();">register here!</a>
and in controller, have function this:
$scope.register = function() { $window.location = '#/register'; };
for example, homepage domain.com/#/home
, try link domain.com/#/register
.
Comments
Post a Comment