Angularjs on page load call function

后端 未结 7 474
臣服心动
臣服心动 2021-01-14 10:09

I am learning AngularJS. I have some article tag and on clicking on a button each article page is showed without any page refresh. This is one page website. Wha

7条回答
  •  野的像风
    2021-01-14 10:30

        var someVr= element[0].querySelector('#showSelector');
            myfunction(){
            alert("hi");
            }   
            angular.element(someVr).ready(function () {
               myfunction();
                });
    

    This will do the job.

提交回复
热议问题