yes it does works thank you so much for very simple fixed it I never knew 
about the orders of "when". 

also, one more question will be ok if like this

.when('/:view1Id',{
                    templateUrl: 'view1-details.html',
                     controller: 'view1-detailsCtrl'
        })
.when('/:view2Id',{
                    templateUrl: 'view1-details.html',
                     controller: 'view1-detailsCtrl'
        })
will be there still be encompasses all since the ID is not same? 
 

On Tuesday, August 25, 2015 at 2:53:16 PM UTC-5, Armando Couto wrote:
>
> I believe that this regular expression '/: view1Id' encompasses all, there 
> is always something will fall there, but if you change the order will see 
> what works.
>
> app.config(['$routeProvider', function($routeProvider) {
> $routeProvider
> .when('/',{
> templateUrl: 'view1.html',
> controller: 'view1Ctrl'
> })
> .when('/cat2',{
> templateUrl: 'view2.html',
> controller: 'view2Ctrl'
> })
> .when('/cat3',{
> templateUrl: 'view3.html',
> controller: 'view3Ctrl'
> })
> .when('/:view1Id',{
> templateUrl: 'view1-details.html',
> controller: 'view1-detailsCtrl'
> })
>  .otherwise({
>   redirectTo: '/'
>  });
> }]);
>
> 2015-08-25 16:24 GMT-03:00 brian van vlymen <[email protected] 
> <javascript:>>:
>
>> I could not click on Category 2 or Category 3 at all. I am stuck with 
>> ".when('/:view1Id " because of $routeParams . 
>>
>> here an example 
>>
>> http://plnkr.co/edit/qhwQihV7hqcvaA6KvEL9?p=preview
>>
>> I am struggled with this and I dont understand why it does not work that 
>> way... 
>>
>> please help thanks. 
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Att
> Armando Couto 
> CSM - LKU
> www.armandocouto.com.br
>

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