我在angularjs的summernote中使用ng-int指令时出现了解析错误。下面是代码:
<summernote name="template_content" ng-model="document.template_content" ng- init="document.template_content='{{$documentTemplate->content}}'" height="500"> </summernote>
我想做的是ng-init指令,用laravel变量data初始化ngModel。然而,我得到一个错误说
语法错误:记号'Times'位于从[{4}]开始的表达式[{3}]的列{2}。
这是我试图在summernote '本票
J$ 500,000.00 '中显示的值是什么原因导致我得到这个错误,而不是在夏日笔记指令ngModel中显示信息?
ngInit接受逻辑语句,而不是表达式。所以你不应该使用任何{{}}
插值语法。试试这个。
ng-init="document.template_content=$documentTemplate.content"