I tried to convert string variable to html with angular, I get $compile component suggestion but something went wrong
My controller:
ChatZamba.controller("ScriptController", ['$scope', '$compile', function ($scope, $timeout, $compile) {
And My angular function:
function build_step_view(data, i){
if(data != undefined){
var tmp = $compile($('.detail-script-list'))(scope);
$('.detail-script-list').append(tmp);
}
}
But I get TypeError: $compile is not a function in Chrome complier when triggered my function.
Help me! Thanks!