[英]How angularjs function can return html code with angularjs directive
Here is problem 这是问题
helper.getDataForTriggeredUploadOfMFFile = function (isTriggeredUploadMF) {
if (!isTriggeredUploadMF) {
return 'None';
} else {
return '<spa ng-click=\"previewDataOnSmartAnalytics()>Preview Data</span>';
}
};
In browser there is not ng-click directive. 在浏览器中没有ng-click指令。 How solve it? 怎么解决呢?
It could be due to a typo in 这可能是由于输入错误
return '<spa ng-click=\\"previewDataOnSmartAnalytics()>Preview Data</span>';
There is no ending "
. Notice that you should be able to avoid the escape if you are using double apex inside singole apex. 没有结尾"
。请注意,如果在单尖顶内部使用双尖顶,则应该能够避免转义。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.