Angularjs on page load call function

后端 未结 7 560
臣服心动
臣服心动 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:50

    It's not the angular way, remove the function from html body and use it in controller, or use

    angular.element(document).ready
    

    More details are available here: https://stackoverflow.com/a/18646795/4301583

提交回复
热议问题