javascript - Need to print mustache style literals to screen ("{{}}") inside angular app -


within angularjs application, need show user can use liquid markup inside of text box.

unfortunately, liquidmarkup uses {{ the_same_syntax_as_angular }} , explanation text evaluated angular code.

  • i not wish change liquid markups default delimiters.
  • the escape char (\) not stop angular evaluating expression.
  • the sample text within placeholder attribute of <input> tag. it not within dom node.

how can escape angular's double mustache syntax print example?

<div ng-non-bindable>ignored: {{ mustache example }}</div>

working examples:

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>  <body ng-app="">  <div>normal: {{1 + 2}}</div>  <div ng-non-bindable>ignored: {{1 + 2}}</div>  <div>ignored inside placeholder: <input ng-non-bindable placeholder="{{1 + 2}}"/></div>  </body>

https://docs.angularjs.org/api/ng/directive/ngnonbindable


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -