title: Routing AngularJs / Laravel
body: <p>I got some problems using Laravel and Angular.</p>
  
  <p>There my route.php</p>
  
  <pre><code>route.php
  
  Route::group(array('domain' =&gt; 'dev.sydif.com'), function()
  {
     Route::get('/' , 'IndexController@index');
     Route::get('/product' , 'IndexController@index');
     Route::get('/aboutus' , 'IndexController@index');
     Route::get('/product' , 'IndexController@index');
     Route::get('/signup' , 'IndexController@index');
     Route::get('/myproduct' , 'MyProductController@index');
  });
  </code></pre>
  
  <p>My Angular modules</p>
  
  <pre><code>application.js
  
  sydifApp.config(['$routeProvider', '$locationProvider' ,
  function($routeProvider, $locationProvider) {
      $routeProvider.when('/', {
          templateUrl: 'public_html/template/home.html',
          controller: 'HomeCtrl',
          user_role: 0
      }).when('/aboutus', {
          templateUrl: 'public_html/template/aboutUs.html',
          controller: 'AboutCtrl',
          user_role: 0
      }).when('/product', {
          templateUrl: 'public_html/template/product.html',
          controller: 'ProductCtrl',
          user_role: 0
      }).when('/signup', {
          templateUrl: 'public_html/template/signUp.html',
          controller: 'SignUpCtrl',
          user_role: 0
      }).when('/myproduct', {
          templateUrl: 'public_html/template/myProduct.html',
          controller: 'MyProductCtrl',
          user_role: 0
      }).otherwise({
          redirectTo: '/'
      });
      $locationProvider.html5Mode(true);
  }]);
  </code></pre>
  
  <p>So when I came first on each route it works I see the pages. However for the Controller <strong>MyProductController</strong> i put a var dump like this :</p>
  
  <pre><code>MyProductController.php
  
  public function index()
      {
          var_dump('expression');
          return View::make('index');
      }
  </code></pre>
  
  <p>What is the problem : When I go to the url <strong>/myproduct</strong> it's look like the Controller MyProductController is not loaded because i can't see the var_dump(). When I refresh the pages then the var_dump is visible. I am using ng-view inside the index.php and I have separated the back-end from the front-end. </p>
  
  <p>Do you have any idea why my Controller is not load first?</p>
  
  <p>I try to be as clear as possible.</p>
  
  <p>Thank you for your help.</p>