-3
例如:
JS:Angular如何用{{}}輸出字符串?
var str = "this my mark {{a}} {{e}} {{i} {{o}} {{u}}, select one!";
$scope.tip = str;
HTML:
<p>{{tip}}</p>
如何使輸出this my mark {{a}} {{e}} {{i} {{o}} {{u}}, select one!
?
非常感謝!我必須使用一個效率低下的方法:'string.replace(/ {/ g,'{&shy')。replace(/}/g,'}&害羞')',現在我可以用''+ string +'' –