mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
refactor(gesture): move eventType out of compile
eventType only needs to be set once per directive, not every compile.
This commit is contained in:
3
js/angular/directive/gesture.js
vendored
3
js/angular/directive/gesture.js
vendored
@@ -237,11 +237,12 @@ forEach(
|
||||
|
||||
function gestureDirective(directiveName) {
|
||||
return ['$ionicGesture', '$parse', function($ionicGesture, $parse) {
|
||||
var eventType = directiveName.substr(2).toLowerCase();
|
||||
|
||||
return {
|
||||
restrict: 'A',
|
||||
compile: function($element, attr) {
|
||||
var fn = $parse( attr[directiveName] );
|
||||
var eventType = directiveName.substr(2).toLowerCase();
|
||||
|
||||
return function(scope, element, attr) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user