Merge pull request #101 from resin-io/doc/ng-cloak

Explain why we toggle body's display manually instead of using ngCloak
This commit is contained in:
Juan Cruz Viotti 2016-01-19 10:27:45 -04:00
commit 26f2104163
2 changed files with 16 additions and 2 deletions

View File

@ -80,7 +80,14 @@ app.controller('AppController', function($q, DriveScannerService, SelectionState
this.restart(); this.restart();
// We're ready to unhide the application now // We manually add `style="display: none;"` to <body>
// and unset it here instead of using ngCloak since
// the latter takes effect as soon as the Angular
// library was loaded, but doesn't always mean that
// the application is ready, causing the application
// to be shown in an unitialized state for some milliseconds.
// Here in the controller, we are sure things are
// completely up and running.
document.querySelector('body').style.display = 'initial'; document.querySelector('body').style.display = 'initial';
this.selectImage = function() { this.selectImage = function() {

View File

@ -79,7 +79,14 @@ app.controller('AppController', function($q, DriveScannerService, SelectionState
this.restart(); this.restart();
// We're ready to unhide the application now // We manually add `style="display: none;"` to <body>
// and unset it here instead of using ngCloak since
// the latter takes effect as soon as the Angular
// library was loaded, but doesn't always mean that
// the application is ready, causing the application
// to be shown in an unitialized state for some milliseconds.
// Here in the controller, we are sure things are
// completely up and running.
document.querySelector('body').style.display = 'initial'; document.querySelector('body').style.display = 'initial';
this.selectImage = function() { this.selectImage = function() {