var searchRoute = "/search/:query/:sort?/:limit?";
$scope.goToSearch = function(opts){
// opts could be {query: 'foo', limit: 10}
var url = $route.interpolate(searchRoute, opts);
$location.path(url);
};
--
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 angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/bEX5Ateee98/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
As Sander said, the $routeParams is the missing service :-)
Regards,
Witold Szczerba
--
--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/bEX5Ateee98/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
--
I could also write my own forEach and isUndefined in plain javascript. But since AngularJS already does this they expose it through an API, and I don't have to write it.
I want to pass one of the paths that I original passed to $routeProvider.when(path, {...}) along with an object of parameters and get a resulting URL which I could set in $location.path().
--
--
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 angular+u...@googlegroups.com.