I am trying to add something like dynamic HTML using ng-bind-html but its not working with $scope variable
Here is my Angular code
1)My controller
$scope.name = "Parshuram" $scope.thisCanBeusedInsideNgBindHtml = $sce.trustAsHtml("<div>{{name}}</div>"); Also that my string is dynamic
"<div><table class=" + "\"table table - bordered table - responsive table - hover add - lineheight table_scroll\"" + "><thead><tr><td>Name</td><td>Age</td></tr></thead><tbody><tr ng-repeat=" + "\"tr in dyna\"" + "><td>{{tr.name}}</td><td>{{tr.age}}</td></tr></tbody></table></div>" So i cant replace every variable with $scope
2)- My HTML
<div ng-app="mymodule" ng-controller="myModuleController"> <div ng-bind-html="thisCanBeusedInsideNgBindHtml"></div> </div> I got this output
{{name}} My expected output is
Parshuram Please can anyone help i am stuck at this point,does that $sce does not bind scope variable?? ..
ng-include="'//theserver/somepage'"and that will fetch the html and include it as a template.$scope.template = '//localhost:22475/api/mymodule';then in the html<div ng-include="template"></div>