angular.module('ionic.ui', []) .controller('SideMenuCtrl', function($scope) { var _this = this; angular.extend(this, SideMenuController.prototype); SideMenuController.call(this, { left: { width: 270, isEnabled: true, pushDown: function() { $scope.leftZIndex = -1; }, bringUp: function() { $scope.leftZIndex = 0; } }, right: { width: 270, isEnabled: true, pushDown: function() { $scope.rightZIndex = -1; }, bringUp: function() { $scope.rightZIndex = 0; } }, content: { onDrag: function(e) {}, endDrag: function(e) {}, getTranslateX: function() { /* var r = /translate3d\((-?.+)px/; var d = r.exec(this.el.style.webkitTransform); if(d && d.length > 0) { return parseFloat(d[1]); } */ return $scope.contentTranslateX || 0; }, setTranslateX: function(amount) { $scope.contentTranslateX = amount; $scope.$apply(); }, enableAnimation: function() { //this.el.classList.add(this.animateClass); $scope.animationEnabled = true; }, disableAnimation: function() { //this.el.classList.remove(this.animateClass); $scope.animationEnabled = false; } } }); $scope.contentTranslateX = 0; }) .directive('sideMenuController', function() { return { restrict: 'E', controller: 'SideMenuCtrl', replace: true, transclude: true, template: '