Il giorno 24/mar/2014, alle ore 12:21, Marcelo Ribeiro <[email protected]>
ha scritto:
> Hello,
> Good day.
>
> I'm starting in angularjs, rode a page it put the ng-view and from there ok,
> all pages "partials" are loaded within the ng-view everything right ... But
> when the user clicks on the "Logof" I need directs you to an entirely new
> page, but it is bringing my login.html file into the ng-view, like a partial
> but do not want this effect, I want to bring the whole page, how should I do
> this? excuse the ignorance ...
Hi, you need to use "$window.location.href = URL" in you ng-click function.
For example in my controller code I have this:
$scope.search = {};
$scope.searchPosts = function() {
if (typeof $scope.search.city != 'undefined') var city =
$scope.search.city;
else var city = 0;
if (typeof $scope.search.category != 'undefined') var category =
$scope.search.category;
else var category = 0;
$window.location.href = "/search/"+city+","+category;
}
where "searchPosts" is write in this way in my html:
<form>
....
<button type="button" ng-click="searchPosts(search)"></button>
</form>
M.
--
Davide Morelli
[email protected]
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.