diff --git a/js/angular/controller/navBarController.js b/js/angular/controller/navBarController.js index 5fe099bd18..50b052dc74 100644 --- a/js/angular/controller/navBarController.js +++ b/js/angular/controller/navBarController.js @@ -18,10 +18,10 @@ function($scope, $element, $attrs, $ionicViewService, $animate, $compile, $ionic var self = this; - this.leftButtonsElement = angular.element( + this.leftButtonsElement = jqLite( $element[0].querySelector('.buttons.left-buttons') ); - this.rightButtonsElement = angular.element( + this.rightButtonsElement = jqLite( $element[0].querySelector('.buttons.right-buttons') ); @@ -93,7 +93,7 @@ function($scope, $element, $attrs, $ionicViewService, $animate, $compile, $ionic currentTitles = $element[0].querySelectorAll('.title'); if (currentTitles.length) { oldTitleEl = $compile('
')($scope); - angular.element(currentTitles[0]).replaceWith(oldTitleEl); + jqLite(currentTitles[0]).replaceWith(oldTitleEl); } //Compile new title newTitleEl = $compile('')($scope); @@ -101,18 +101,18 @@ function($scope, $element, $attrs, $ionicViewService, $animate, $compile, $ionic //Animate in on next frame ionic.requestAnimationFrame(function() { - oldTitleEl && $animate.leave(angular.element(oldTitleEl)); + oldTitleEl && $animate.leave(jqLite(oldTitleEl)); - var insert = oldTitleEl && angular.element(oldTitleEl) || null; + var insert = oldTitleEl && jqLite(oldTitleEl) || null; $animate.enter(newTitleEl, $element, insert, function() { self._headerBarView.align(); }); //Cleanup any old titles leftover (besides the one we already did replaceWith on) - angular.forEach(currentTitles, function(el) { + forEach(currentTitles, function(el) { if (el && el.parentNode) { //Use .remove() to cleanup things like .data() - angular.element(el).remove(); + jqLite(el).remove(); } }); diff --git a/js/angular/controller/scrollController.js b/js/angular/controller/scrollController.js index ed87735b7d..024cc4cca7 100644 --- a/js/angular/controller/scrollController.js +++ b/js/angular/controller/scrollController.js @@ -24,7 +24,7 @@ function($scope, scrollViewOptions, $timeout, $window, $$scrollValueCache, $loca this._scrollViewOptions = scrollViewOptions; //for testing var element = this.element = scrollViewOptions.el; - var $element = this.$element = angular.element(element); + var $element = this.$element = jqLite(element); var scrollView = this.scrollView = new ionic.views.Scroll(scrollViewOptions); //Attach self to element as a controller so other directives can require this controller diff --git a/js/angular/controller/sideMenuController.js b/js/angular/controller/sideMenuController.js index e2d6d5e191..c75bfe8010 100644 --- a/js/angular/controller/sideMenuController.js +++ b/js/angular/controller/sideMenuController.js @@ -6,7 +6,7 @@ IonicModule '$ionicPlatform', function($scope, $attrs, $ionicSideMenuDelegate, $ionicPlatform) { var self = this; - angular.extend(this, ionic.controllers.SideMenuController.prototype); + extend(this, ionic.controllers.SideMenuController.prototype); this.$scope = $scope; diff --git a/js/angular/controller/tabsController.js b/js/angular/controller/tabsController.js index cf68e4ad79..f3a7a39155 100644 --- a/js/angular/controller/tabsController.js +++ b/js/angular/controller/tabsController.js @@ -68,7 +68,7 @@ function($scope, $ionicViewService, $element) { $ionicViewService.goToHistoryRoot(tab.$historyId); } } else { - angular.forEach(self.tabs, function(tab) { + forEach(self.tabs, function(tab) { self.deselect(tab); }); diff --git a/js/angular/directive/collectionRepeat.js b/js/angular/directive/collectionRepeat.js index 7561efb532..70d57354cd 100644 --- a/js/angular/directive/collectionRepeat.js +++ b/js/angular/directive/collectionRepeat.js @@ -168,14 +168,14 @@ function($collectionRepeatManager, $collectionDataSource, $parse) { var heightGetter = function(scope, locals) { var result = heightParsed(scope, locals); - if (angular.isString(result) && result.indexOf('%') > -1) { + if (isString(result) && result.indexOf('%') > -1) { return Math.floor(parseInt(result, 10) / 100 * scrollView.__clientHeight); } return result; }; var widthGetter = function(scope, locals) { var result = widthParsed(scope, locals); - if (angular.isString(result) && result.indexOf('%') > -1) { + if (isString(result) && result.indexOf('%') > -1) { return Math.floor(parseInt(result, 10) / 100 * scrollView.__clientWidth); } return result; diff --git a/js/angular/directive/content.js b/js/angular/directive/content.js index ecb68f79f5..e85f4e7d5d 100644 --- a/js/angular/directive/content.js +++ b/js/angular/directive/content.js @@ -49,7 +49,7 @@ function($timeout, $controller, $ionicBind) { if (attr.scroll != 'false') { //We cannot use normal transclude here because it breaks element.data() //inheritance on compile - innerElement = angular.element(''); + innerElement = jqLite(''); innerElement.append(element.contents()); element.append(innerElement); } diff --git a/js/angular/directive/item.js b/js/angular/directive/item.js index 1d8fa4093e..dd2bccfd72 100644 --- a/js/angular/directive/item.js +++ b/js/angular/directive/item.js @@ -43,7 +43,7 @@ function($animate, $compile) { /ion-(delete|option|reorder)-button/i.test($element.html()); if (isComplexItem) { - var innerElement = angular.element(isAnchor ? ITEM_TPL_CONTENT_ANCHOR : ITEM_TPL_CONTENT); + var innerElement = jqLite(isAnchor ? ITEM_TPL_CONTENT_ANCHOR : ITEM_TPL_CONTENT); innerElement.append($element.contents()); $element.append(innerElement); diff --git a/js/angular/directive/itemDeleteButton.js b/js/angular/directive/itemDeleteButton.js index f01df55cb6..e5c78580d7 100644 --- a/js/angular/directive/itemDeleteButton.js +++ b/js/angular/directive/itemDeleteButton.js @@ -44,7 +44,7 @@ IonicModule return function($scope, $element, $attr, ctrls) { var itemCtrl = ctrls[0]; var listCtrl = ctrls[1]; - var container = angular.element(ITEM_TPL_DELETE_BUTTON); + var container = jqLite(ITEM_TPL_DELETE_BUTTON); container.append($element); itemCtrl.$element.append(container).addClass('item-left-editable'); diff --git a/js/angular/directive/itemOptionButton.js b/js/angular/directive/itemOptionButton.js index 9a33396230..2a80731ac1 100644 --- a/js/angular/directive/itemOptionButton.js +++ b/js/angular/directive/itemOptionButton.js @@ -37,7 +37,7 @@ return { $attr.$set('class', ($attr['class'] || '') + ' button', true); return function($scope, $element, $attr, itemCtrl) { if (!itemCtrl.optionsContainer) { - itemCtrl.optionsContainer = angular.element(ITEM_TPL_OPTION_BUTTONS); + itemCtrl.optionsContainer = jqLite(ITEM_TPL_OPTION_BUTTONS); itemCtrl.$element.append(itemCtrl.optionsContainer); } itemCtrl.optionsContainer.append($element); diff --git a/js/angular/directive/itemReorderButton.js b/js/angular/directive/itemReorderButton.js index 18bfcf8f94..7c275c5340 100644 --- a/js/angular/directive/itemReorderButton.js +++ b/js/angular/directive/itemReorderButton.js @@ -64,7 +64,7 @@ IonicModule }); }; - var container = angular.element(ITEM_TPL_REORDER_BUTTON); + var container = jqLite(ITEM_TPL_REORDER_BUTTON); container.append($element); itemCtrl.$element.append(container).addClass('item-right-editable'); diff --git a/js/angular/directive/list.js b/js/angular/directive/list.js index c6f71c35c8..94dbbd624b 100644 --- a/js/angular/directive/list.js +++ b/js/angular/directive/list.js @@ -82,7 +82,7 @@ function($animate, $timeout) { require: ['ionList', '^?$ionicScroll'], controller: '$ionicList', compile: function($element, $attr) { - var listEl = angular.element('