68
rated 0 times
[
75]
[
7]
/ answers: 1 / hits: 72550
/ 12 Years ago, wed, december 12, 2012, 12:00:00
Is there a way to call an Angular function from a JavaScript function?
function AngularCtrl($scope) {
$scope.setUserName = function(student){
$scope.user_name = 'John';
}
}
I need the following functionality in my HTML:
jQuery(document).ready(function(){
AngularCtrl.setUserName();
}
The problem here is my HTML code is present when page is loaded and hence the ng directives in the html are not compiled. So I would like to $compile(jQuery(PopupID));
when the DOM is loaded.
Is there a way to call a Angular function on document ready?
More From » angularjs