I have large html page with forms and tables built in angular.
The JS including loading other included templates, loading external JS files and aggregating data and formatting a large html table, it is fine.
But... it is just there is this time gap to display the final page. I don't mind being slow. Only I don't want to see a freezing screen.
I have tried :
angular element document.ready
angular element window.load
$timeout(fn, 0)
data-ng-init
$scope.$on('$viewContentLoaded',fn)
$transitions (wrong idea)
None of them can fire any event to tell me the page is done loading. Or should it be called "decompressing"? Because it seems the Dom and Data are all in memory only it is not being displayed.
If I break apart ng-include and insert the duplicated columns by hand(quite a nightmare), I can see the page is sort of displayed in some incomplete shape quickly, freezing, the form elements are still taking time to load fully. then boom! it loads.
I am pondering to use a $interval now to detect some hidden element appears on page to show some evidence of page finished loading. But this is just feels not right.
Am I reaching some sort of limit of the HTML rendering? My table is about 1500 rows and 20 columns with inputs and selects elements.
angular.element(document).ready(function() {
console.log("angular.element(document).ready");
});
$scope.$on('$viewContentLoaded', function() {
console.log("view content loaded");
});
angular.element(window).bind('load', function() {
console.log("angular element window.load");
});
$window.onload = function() {
console.log("window.noload");
};
Output
view content loaded
angular element window.load
window.noload
angular.element(document).ready