I'm using AngularJS 1.2. What is the proper way to build a route path with parameters? String concatenation seems to be the only way, but it doesn't seem to be right.
Supposed I have this route
$routeProvider.when('/my-route/:param1/:param2', ...);
I could manually build that route up like this:
$location.path('/my-route/' + param1 + '/' + param2);
I would expect that I could do something like this:
$route.goTo('/my-route/:param1/:param2', {
param1: param1,
param2: param2
});
I am not permitted to changing to use ui-router
.