2014-05-09 52 views
1

我有視圖Laravel路由到角app文件夾

-public 
--site 
---app (this one shoul hold an angular app) 
---views (normal php views are stored here) 
--routes.php 

以下laravel結構比我想創建到我的角度的應用程序的路由,其應與laravel RESTAPI

之一通信我路線這是工作

Route::get('blog', array('as' => 'article.list', function() 
{ 
    return View::make('site::articles')->with('entries', Article::orderBy('created_at', 'desc')->get()); 
})); 

但如何將我的路線我的角度應用到應用的子文件夾

Route::get('configurator', array('as' => configurator', function() 
{ 
    // this won't work View [app.index] not found. 
    //return View::make('site::app.index'); 
})); 

回答

1

你應該創建一個laravel視圖,然後在這個視圖內調用你的角度路由。

+0

yepp這就是我所做的,但問題是如果是一種可靠的方式來做或不做? – fefe

+0

是的。查看這些教程瞭解更多詳情: http://scotch.io/tutorials/javascript/single-page-apps-with-angularjs-routing-and-templating http://scotch.io/tutorials/php/create -a-laravel和棱角單頁註釋的應用程序 –