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