1

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>
4
  • What do you mean "aftter loading div"..? are you loading content into this div, or do you mean after div is loaded in DOM..? Are you using some plugin..? Commented Mar 8, 2016 at 13:21
  • after loading div i need to call javascript funciton Commented Mar 8, 2016 at 13:38
  • That is the same thing you've mentioned in question. It is not clear what that means Commented Mar 8, 2016 at 13:39
  • What do you want to achieve basically when you call that function? We can point you in right direction if you provide details. Commented Mar 8, 2016 at 13:56

2 Answers 2

1

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>
Sign up to request clarification or add additional context in comments.

Comments

0

To use ng-load, your function must be placed in Angualr controller

This link schould help you:

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.