I\'m using python/django as a backend with complex forms structure.
I got an angular controller which makes and request to get a suitable form. I found a django-angular
Create directive to $compile
your html.
angular.module("app").directive('compilehtml', ["$compile", "$parse", function($compile, $parse) {
return {
restrict: 'A',
link: function($scope, element, attr) {
var parse = $parse(attr.ngBindHtml);
function value() { return (parse($scope) || '').toString(); }
$scope.$watch(value, function() {
$compile(element, null, -9999)($scope);
});
}
}
}]);
Then add this directive
<div ng-bind-html="form" compilehtml></div>
DEMO