diff --git a/src/js/controller/mail-list.js b/src/js/controller/mail-list.js index 6839cb7..2d87e01 100644 --- a/src/js/controller/mail-list.js +++ b/src/js/controller/mail-list.js @@ -354,17 +354,17 @@ define(function(require) { // var ngModule = angular.module('mail-list', []); - ngModule.directive('ngIscroll', function($timeout) { + ngModule.directive('ngIscroll', function($parse) { return { - link: function(scope, elm) { - $timeout(function() { + link: function(scope, elm, attrs) { + var model = $parse(attrs.ngIscroll); + scope.$watch(model, function() { var myScroll; // activate iscroll myScroll = new IScroll(elm[0], { mouseWheel: true }); }); - } }; }); diff --git a/src/tpl/mail-list.html b/src/tpl/mail-list.html index 0a97bf4..9546da7 100644 --- a/src/tpl/mail-list.html +++ b/src/tpl/mail-list.html @@ -4,7 +4,7 @@

{{state.nav.currentFolder.type}}

-
+