Skip to content

Instantly share code, notes, and snippets.

@tvl83
Created June 4, 2014 11:43
Show Gist options
  • Save tvl83/16e09b32496d412cf610 to your computer and use it in GitHub Desktop.
Save tvl83/16e09b32496d412cf610 to your computer and use it in GitHub Desktop.
For some reason the routes are not getting caught. When I click a link it hits the server and rails fails to find a route.
var app = angular.module("MyApp", ['ngResource', 'ngRoute']);
app.config(['$routeProvider', function($routeProvider) {
$routeProvider
.when( '/bundles/', { templateUrl: '../templates/bundlesIndex.html', controller: 'BundlesCtrl' } )
.when( '/bundles/:nameSlug', { templateUrl: '../templates/bundlesView.html', controller: 'BundlesCtrl' } )
.otherwise({ templateUrl: '../templates/homeIndex.html', controller: 'MainCtrl' } );
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment