嗨,我用的是django,里面有一个内角。但是我没有将django变量赋给angularjs变量。对不起,我很难解释清楚。这是我的代码
我将标记从{{
插入到{$
,这样angularjs和django就不会有任何冲突。你知道吗
djangoVariable
-这是从包含大量文本和多行段落的textarea获取的
html文件
<div ng-controller="ProfileCtrl">
<p>{$ description $} </p>
</div>
<script>
app
.controller('ProfileCtrl', function($scope){
$scope.description= {{djangoVariable}};
})
</script>
问题是,值没有显示出来。你知道吗
我希望我解释得很好。先谢谢你
这一定是失败的,因为{djangoVariable}}创建了一些javascript无法理解的间隔文本,如果将变量放入“”,它应该能够理解。试试这个
相关问题 更多 >
编程相关推荐