There are several ways to achieve the goal, but you no longer use the blade. Here I just explain the easiest way.
1. create index.php (not index.blade.php), in your route.php, you have:
Route::get('/', function() { return View::make('index'); });
It will return you an index page.
In index.php, please indicate
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.min.js"></script> <script src="http://code.angularjs.org/1.2.3/angular-route.js"></script>
or your local dependencies.
In the shared folder, you can create a folder called "js", another folder called "templates".
In the js file, your app.js, controller.js, etc. are created. (don't forget to include them in your index.php)
In the templates folder, you will create your html template. In your example, they are "home.html", "about.html", "contact.html",
On the index page, you will perform angular routing here.
app.js:
var app = angular.module('app', [ 'ngRoute' ]); app.config(function($routeProvider) { $routeProvider .when('/', { templateUrl : 'templates/home.html', controller : 'mainController' })
.when('/about', { templateUrl : 'templates/about.html', controller : 'aboutController' }) .when('/contact', { templateUrl : 'templates/contact.html', controller : 'contactController' }); });
source share