angularjs - Javascript: how to include a string literal into another one? -
say we've got tag follows:
<div ng-init="html='<a ng-click=\'openpopover(\'#choixdeladensiterecherche\')\'>click</a>'"></div>
(i need set variables html code)
this doesn't work. how write escaping innermost simple quotes?
ps: don't know why \" \" didn't worked either.
[edit 1] lecture error: [error] error: [$parse:lexerr] lexer error: unexpected next character @ columns 12-12 [] in expression [openpopover(].
try "
, example:
<div onclick="alert('<a ng-click="openpopover(\'#choixdeladensiterecherche\')">click</a>')">aaaaa</div>
Comments
Post a Comment