angular.js - For a single page written in ng, every time you return to the previous page, the data must be reloaded, that is, the (loading) waiting process. How to solve this problem?
PHP中文网
PHP中文网 2017-05-15 17:09:08
0
1
625

1. The dynamic data of each page is obtained in the controller using $http.get(), and then looped out using ng-repeat on the html page!
2. Jump to the page and return to the previous page. I write it with a tag.
Problem: Every time you return to the previous page, you have to reload the data, which gives the user a terrible experience!

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
phpcn_u1582

What do you use for routing? ui-router? Don’t jump directly to the a tag on a single page. You have to reload the resources every time.

Generally, single-page routing has corresponding jump methods.

Ng1, ui-router

  1. router-link='/xxx/xxx'

  2. In controller, $state.go('/xxx/xxx');

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template