Disable ng-touch at a specific location

I am using carousel from ui.bootstrap

and for this I need to use ng-touch. When I enter my application with ngTouch

, it slows down some things, mobile device inputs cannot be clicked. How can I add a specific controller, I tried to make two different modules, but I need to load the module using ngTouch inside the ng-app module and again, which is slow.

angular.module('appModule',['carouselModule'])
angular.module('carouselModule',['ngTouch','ui.bootstrap'])

      

+3


source to share


1 answer


With the help of @estus guide I found a solution.

directives.stopEvent=function() {
    return {
        restrict: 'A',
        link: function(scope, element, attr) {
            element.on(attr.stopEvent, function(e) {
                e.stopPropagation();
            });
        }
    };
}

      



and in html for example:

<div id="topbar" stop-event="touchend">...</div>

      

+3


source







All Articles