title: AngularJS dynamic/wildcard routes
body: <p>I'm completely new to Angular, and am trying to sort out some dynamic/wildcard routes so I don't have to define each page manually.</p>
  
  <p>I've got a module like so:</p>
  
  <pre><code>function() {
      "use strict";
      angular.module("app", ["ngRoute", "ngAnimate", "ui.bootstrap", "easypiechart", "ui.tree", "ngMap", "ngTagsInput", "angular-loading-bar", "app.controllers", "app.directives", "app.localization", "app.nav", "app.ui.ctrls", "app.ui.directives", "app.ui.services", "app.ui.map", "app.form.validation", "app.ui.form.ctrls", "app.ui.form.directives", "app.tables", "app.task", "app.chart.ctrls", "app.chart.directives", "app.page.ctrls"]).config(["$routeProvider", function($routeProvider) {
          var routes, setRoutes;
          return routes = ["dashboard", "pages/404", "actions/ActionOne", "actions/ActionTwo"], setRoutes = function(route) {
          //                                                    ^      and      ^
              var config, url;
              return url = "/" + route, config = {
                  templateUrl: "views/" + route + ".html"
              }, $routeProvider.when(url, config), $routeProvider
          }, routes.forEach(function(route) {
              return setRoutes(route)
          }), $routeProvider.when("/", {
              redirectTo: "/dashboard"
          }).when("/404", {
              templateUrl: "views/pages/404.html"
          }).otherwise({
              redirectTo: "/404"
          })
      }])
  </code></pre>
  
  <p><code>ActionOne</code> and <code>ActionTwo</code> are examples of some action pages, but there could be a couple dozen or so, and they change sometimes.</p>
  
  <p>How can I set this up to support a wildcard (e.g., <code>actions/:action</code>) so I can use that parameter to dynamically determine the route?</p>
  
  <hr>