Yes you're right, if you're calling this function out of a angularjs function/context, then you need to call $scope.apply() after compile.
Yes you're right, if you're calling this function out of a angularjs function/context, then you need to call $scope.apply() after compile.