client/app/components/app_service.js
changeset 178 a3e1106b6f96
parent 172 ffdfe491869c
child 184 4d01c2d04359
equal deleted inserted replaced
177:4a79d51d0b50 178:a3e1106b6f96
   107     .directive('imgType', function(){
   107     .directive('imgType', function(){
   108         return {
   108         return {
   109             restrict: 'AE',
   109             restrict: 'AE',
   110             link: function(scope, elem) {
   110             link: function(scope, elem) {
   111                 elem.bind('error', function() {
   111                 elem.bind('error', function() {
   112                     elem.parents('li.item').addClass('no-img');
   112                     elem.parent().addClass('no-img');
   113                     elem.remove();
   113                     elem.remove();
   114                 });
   114                 });
   115                 elem.on('load', function() {
   115                 elem.on('load', function() {
   116                     var w = elem.width(),
   116                     var w = elem.width(),
   117                         h = elem.height();
   117                         h = elem.height();