I have an angular controller that I'm setting up to use the "controller as" syntax:
angular.module('app', []).controller('ctrl1', ctrl1);
ctrl1.$inject = ['$http', '$compile'];
function ctrl1($http, $compile) {
function someHttpGet() {
//get data
var compiled = $compile(data)($scope);
}
}
the reason I'm even trying to bind the compiled data to a scope object is because I saw an answer that said to do that, but it doesnt make sense to me because in my view I'm using the controller as syntax.
how can I get this to work correctly?
controller assyntax was to avoid injecting a scope object?