summaryrefslogtreecommitdiff
path: root/www/js/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/app.js')
-rw-r--r--www/js/app.js19
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