angular.js - The page needs to be filled with js to fill the width. When the ui-router is switched, the page will flicker. How to solve it?
阿神
阿神 2017-05-16 13:19:47
0
3
763

The page needs to be filled with js to fill the width. When ui-router switches, you will see the page flickering. It should be js running. Is there a way to make js execute first and then display the page to eliminate the flickering

阿神
阿神

闭关修行中......

reply all(3)
曾经蜡笔没有小新

You can set a mask layer with 100% height and width first, and then set the mask to display:none after the real page is switched.

迷茫

Simply, you can set a flag bit at the end of js execution, and then you can associate this flag bit through the ng-if/ng-show command to control the display of page elements. If it is more complicated, you can refer to the official Wiki to set the switching animation of ui-view

刘奇

When binding, use ng-bind to bind, or use ng-cloak to process, you can take a look at it in detail

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!