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
placeholderattribute 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>
Comments
Post a Comment