Thanks for the reply. Your solution worked here! I went back and looked at 
some the examples and they were all like yours. Sometimes you can't see the 
forest for the trees.

On Monday, January 26, 2015 at 2:44:33 PM UTC-5, Nicholas Smith wrote:
>
> I'm not sure if it makes a difference but this is how I'm doing something 
> similar in my code:
>
>         $scope.loadDateController = function(id, count) {
>             $location.path('/activities/showdates/' + id);
>         };
>
>
>
> On Monday, January 26, 2015 at 11:36:50 AM UTC-6, Jim Bell wrote:
>>
>> Controller:
>>
>>
>> app.controller('activitiesViewController', ['$scope', 
>> 'ActivitiesFactory', '$location',
>> function($scope, ActivitiesFactory, $location) {
>>
>>     function init () {
>>         $scope.activities =  ActivitiesFactory.getAllWithCounts();
>>     }
>>
>>         init();
>>         $scope.loadDateController = function(id, count) {
>>             $location.path = '/activities/showdates/' + id;
>>         };
>> }]);
>>
>> Routes:
>>
>> app.config(['$routeProvider', function($routeProvider){
>>     $routeProvider
>>
>>         .when('/activities/showdates/:id', {
>>             templateUrl : 'views/datesView.html',
>>             controller  : 'datesViewController'
>>         })
>>
>>         .otherwise({
>>             redirectTo: '/'
>>         });
>> }]);
>>
>> The function "loadDateController" is executed by a button ng_click in the 
>> html. The debugger show that the statement "$location.path = 
>> '/activities/showdates/' + id;" is being executed.
>>
>> When the button is clicked, nothing happens. I looked a many examples on 
>> the web and most of them show that this works. Obviously, I am doing 
>> something that is wrong.
>>
>>

-- 
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.

Reply via email to