wonderfan / javascript

Explore the power of HTML,CSS and JavaScript
1 stars 0 forks source link

How to get the path parameters in AngularJS? #18

Closed wonderfan closed 9 years ago

wonderfan commented 9 years ago
  1. Use the $routeProvider to add the URL mapping
  2. Use $routeParas service to get access to the values
wonderfan commented 9 years ago

The URL syntax:

$routeProvider.when("/customer/:city/:address",options);
wonderfan commented 9 years ago

The options object has two properties: templateURL and controller.