加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

php – 使用Laravel 5与AngularJS刀片标签冲突

发布时间:2020-12-14 19:43:41 所属栏目:大数据 来源:网络整理
导读:我正试图用Laravel 5设置Angular. 我已经在appServiceProvider中尝试过: public function boot(){ Blade::setRawTags("[[","]]"); Blade::setContentTags('%','%'); // for variables and all things Blade Blade::setEscapedContentTags('%%','%%'); //
我正试图用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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读