angularjs - how to use a single controller for multiple routes -
how assign couple of controller , view multiple route patterns in angularjs? example have couple of view , controller:
{ templateurl: '/partial/single-item.html', controller: 'singleitemcontroller' }
witch want them 2 routes:
/car/:id /bike/:id
you can have route : /:myroute/:id , test in controller(or in route regex) value of myroute example
Comments
Post a Comment