Home  >  Q&A  >  body text

angular.js - angular中页面的 will appear 事件是如何实现的?

我希望每当A页面将要被展示的时机都执行一个方法(比如刷新页面数据) 应该如何实现?
PS:controller中的函数只在创建页面时调用,再次回到这个页面并不会调用?

黄舟黄舟2684 days ago470

reply all(1)I'll reply

  • 習慣沉默

    習慣沉默2017-05-15 16:55:21

    You can use the resolve option of routing to solve the operation you want to perform, and the returned data can be injected into the controller.

    reply
    0
  • Cancelreply