// <%= resource.pluralize %> configuration section --------------------------- <%= resource.pluralize %>.config(["$stateProvider", function($stateProvider){ // Add any route you need here $stateProvider. state("<%= resource.pluralize.underscore %>", { url: "<% parents.each do |parent| %>/<%= parent %>/:<%= parent %>_id<% end %>/<%= resource_url %>", templateUrl: template_url("<%= resource_path %>/index"), controller: "<%= resource %>Controller" }). state("<%= resource.pluralize.underscore %>.new",{ url: "/new", templateUrl: template("<%= resource_path %>/new"), controller: "Add<%= resource %>Controller" }). state("<%= resource.pluralize.underscore %>.edit",{ url: "/:id/edit", templateUrl: template("<%= resource_path %>/new"), controller: "Add<%= resource %>Controller" }); }]);