dpd20130 2015-08-25 03:01
浏览 87
已采纳

如何使用javascript(Angular.js)与laravel获取php url(资产)

I use javascript(Angular.js) with laravel

<aside data-ng-include=" {{ asset('layout/nav') }} " id="nav-container"></aside>

but is error:NotFoundHttpException load no path,

What can be read into the .php file?

  • 写回答

1条回答 默认 最新

  • doukong9316 2015-08-25 03:09
    关注

    Im a little confused on what you are trying to do, but it seems that you are using asset() to link a directory. I would use the laravel function link_to() instead, since it is made to generate links to paths.

    Here is the link to the laravel documentation with more information on link_to() and asset():

    http://laravel.com/docs/4.2/helpers#urls

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?