How to execute AngularJS controller function on page load?

前端 未结 14 2569
一整个雨季
一整个雨季 2020-11-22 16:04

Currently I have an Angular.js page that allows searching and displays results. User clicks on a search result, then clicks back button. I want the search results to be disp

14条回答
  •  清歌不尽
    2020-11-22 16:17

    call initial methods inside self initialize function.

    (function initController() {
    
        // do your initialize here
    
    })();
    

提交回复
热议问题