diff options
| author | ARC <arjunrc@gmail.com> | 2015-04-29 21:54:40 -0400 |
|---|---|---|
| committer | ARC <arjunrc@gmail.com> | 2015-04-29 21:54:40 -0400 |
| commit | bcdc2629d7b289c48776169c350d8da3b74f64d4 (patch) | |
| tree | 2d6c08536a6bd25e302a7021172bfe964ecb0903 /www/js/app.js | |
| parent | eabc4988d8627690a0a1111a9a163cbe03692bca (diff) | |
I think I've solved the blank screen issue. I've created an app directive that is triggered on imageonload - that hides an ionic loading. When I first show the modal, I display a "please wait". Timeout of 15 second it goes away. Need to test more, but I think this mostly works
Diffstat (limited to 'www/js/app.js')
| -rw-r--r-- | www/js/app.js | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/www/js/app.js b/www/js/app.js index 908f09bf..d4059074 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -5,12 +5,27 @@ angular.module('zmApp', [ ]) + +.directive('imageonload', function() { + return { + restrict: 'A', + link: function(scope, element, attrs) { + element.bind('load', function() { + //call the function that was passed + scope.$apply(attrs.imageonload); + }); + } + }; + }) + .directive('img', function () { + // element[0].src = 'img/demo.gif'; + return { - restrict: 'AE', + restrict: 'E', link: function (scope, element, attrs) { console.log ("********** IMG DIRECTIVE "); - + //console.log ("Attr ng-src="+attr.ngSrc); // if (!attr.ngSrc) // element[0].src = 'img/demo.gif'; // show an image-missing image |
