Reputation: 261
i need to call java script function aftter loading div please help me to call javascript function after loading angularjs element
<div id="teset" ng-load="getAngularValue()">venn {{test}}</div>
function getAngularValue(){
alert("getAngularValue");
}
</script>
Upvotes: 1
Views: 2797
Reputation: 1097
Why you want call javascript
function inside angularjs
?
Upto my knowledge you can do a lot of work inside angularjs
controller.
<div id="teset" ng-init="getAngularValue()">venn {{test}}</div>
<script>
angular.module('demoApp').controller('demoCtrl',function($scope){
$scope.getAngularValue = function(){
//todo logic
alert("getAngularValue");
};
});
<script>
Upvotes: 1
Reputation: 103
To use ng-load, your function must be placed in Angualr controller
This link schould help you:
Upvotes: 0