我正试图用Laravel 5设置Angular.
我已经在appServiceProvider中尝试过:
public function boot()
{
\Blade::setRawTags("[[","]]");
\Blade::setContentTags('<%','%>'); // for variables and all things Blade
\Blade::setEscapedContentTags('<%%','%%>'); // for escaped data
}
附:
<div>
<input type="text" ng-model="yourName" placeholder="Enter a name here">
<h1>Hello,{{ yourName }}!</h1>
</div>
但我得到:
Use of undefined constant yourName - assumed 'yourName'...
当进行与Blade(扩展刀片,更改标签等)有关的更改时,请务必删除缓存的视图.
它们位于存储/框架/视图中.
只需删除所有文件(.gitignore除外)
如果你想要一些更实用的东西,你可以创建一个命令来做到这一点.像this one