最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to display code block in AngularJS app - Stack Overflow

programmeradmin0浏览0评论

I'm trying to create some website about AngularJS in AngularJS ;-) I've added ng-app on body element, and now all my code snippets (which are all in <pre><code> ... </code></pre> tags) are parsed by angular (it adds ng-binding class for example). Is there a way to tell angular that given block is only code snippet and should't be parsed?

I'm trying to create some website about AngularJS in AngularJS ;-) I've added ng-app on body element, and now all my code snippets (which are all in <pre><code> ... </code></pre> tags) are parsed by angular (it adds ng-binding class for example). Is there a way to tell angular that given block is only code snippet and should't be parsed?

Share Improve this question edited Jan 29, 2020 at 9:39 Vadim Kotov 8,2848 gold badges50 silver badges63 bronze badges asked Feb 10, 2015 at 19:49 BodzioBodzio 2,5202 gold badges21 silver badges37 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 9

Yes, you can use the ngNonBindable directive

For example:

<div ng-non-bindable>Ignored: {{1 + 2}}</div>
发布评论

评论列表(0)

  1. 暂无评论