<div ng-bind="model">
<div>inner html</div>
</div>
Does anyone know how to display the inner div? Seems the ng-bind directive will always rewrite div element.
Thanks in advance.
ng-bind will always print what is in the model. You can do the following thing:
<div>
<div ng-bind="model"></div>
<div>inner html</div>
</div>
Either you can do something like:
//JS
app.controller("nameController", function($sce) {
model = $sce.trustAsHtml("<div>inner html</div>");
});
//HTML
<div ng-bind-html="model"></div>