diff --git a/js/ext/angular/src/service/ionicView.js b/js/ext/angular/src/service/ionicView.js index 6af752b8714..307aafbaf36 100644 --- a/js/ext/angular/src/service/ionicView.js +++ b/js/ext/angular/src/service/ionicView.js @@ -103,9 +103,9 @@ angular.module('ionic.service.view', ['ui.router', 'ionic.service.platform']) return null; }; - View.prototype.destory = function() { + View.prototype.destroy = function() { if(this.scope) { - this.scope.destory && this.scope.destory(); + this.scope.destroy && this.scope.destroy(); this.scope = null; } }; @@ -208,8 +208,8 @@ angular.module('ionic.service.view', ['ui.router', 'ionic.service.platform']) if(forwardsHistory) { // the forward has a history for(var x=forwardsHistory.stack.length - 1; x >= forwardView.index; x--) { - // starting from the end destory all forwards in this history from this point - forwardsHistory.stack[x].destory(); + // starting from the end destroy all forwards in this history from this point + forwardsHistory.stack[x].destroy(); forwardsHistory.stack.splice(x); } }