Creating an app with the two languages, ng for FrontEnd then Laravel serving its requests from the backend. Now, given that these two languages have routing, how do i avoid the routes from conflicting? In my routes.php i have:
Route::get('/', function()
{
return View::make('index');
});
Route::group(array('prefix'=>'api'), function()
{
return Route::resource('students','StudentController');
});
App::missing( function($exception) {
return Redirect::to( '/' );
});
and in my app.js something like this:
var studentApp = angular.module('studentApp', ['controllers', 'studentService','ngRoute']);
studentApp.config(['$routeProvider',function($routeProvider) {
$routeProvider
.when('/', {
controller: 'MainController',
templateUrl: '/partials/list.html'
})
.when('/add', {
controller: 'StudentController',
templateUrl: '/partials/add.html'
})
.otherwise({redirectTo: '/'});
}]);
When i try to use the above, nothing is working. I'm wondering whether the two types of routing are conflicting. Or what is the best way of blending the two routings?