Created
June 4, 2014 11:43
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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