Compiler Ng
Compiler Ng
Example<div ng-app="test" ng-strict-di>
<div id="for-compiled"></div>
</div>
import angular from 'angular';
import CompilerNg from '@jetbrains/ring-ui/components/compiler-ng/compiler-ng';
angular.module('test', [CompilerNg]).
run(function controller($rootScope, rgCompiler) {
const $scope = $rootScope.$new();
$scope.testValue = 'Hello from compiled node';
rgCompiler({template: '<div>{{testValue}}</div>'}).
then(data => {
data.link($scope);
document.getElementById('for-compiled').appendChild(data.element[0]);
});
});