Skip to content

Commit

Permalink
continued work on Issue #43 - added ngAnimate as dependency, experime…
Browse files Browse the repository at this point in the history
…nted with using close() and dismiss() methods from modals documentation. Still cannot resolve issue.
  • Loading branch information
docsmage committed Jul 7, 2016
1 parent 65271dc commit c26bc4f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
2 changes: 2 additions & 0 deletions app/pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
<script src="https://cdn.firebase.com/js/client/2.2.4/firebase.js"></script>
<!-- AngularFire -->
<script src="https://cdn.firebase.com/libs/angularfire/1.1.3/angularfire.min.js"></script>
<!-- Angular Animate-->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular-animate.js"></script>

</head>
<body id="background" class="container">
Expand Down
11 changes: 6 additions & 5 deletions app/scripts/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var relaxIO = angular.module("relaxIO", ["ui.router", "firebase", "ui.bootstrap", "ngCookies"])
var relaxIO = angular.module("relaxIO", ["ui.router", "firebase", "ui.bootstrap", "ngCookies", "ngAnimate"])

// config states & controllers
.config(function($stateProvider, $locationProvider, $urlRouterProvider) {
Expand Down Expand Up @@ -51,13 +51,14 @@ var relaxIO = angular.module("relaxIO", ["ui.router", "firebase", "ui.bootstrap
url: '/profile',
controller: 'ProfileCtrl',
templateUrl: '/templates/profile.html'
});
relaxIO.run(['Auth', 'UserRestService', function run(Auth, UserRestService) {
});

relaxIO.run(['Auth', 'UserRestService', '$uibModalStack', function run(Auth, UserRestService, $uibModalStack) {

var _user = UserRestService.requestCurrentUser();
Auth.set(_user);
$uibModalStack.dismissAll();

}])
}]);

});
6 changes: 4 additions & 2 deletions app/scripts/controllers/NavCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ relaxIO.controller('NavCtrl', ['$scope', 'SaveMix', 'LogOut', 'Session', 'SoundS
$scope.openSaveMix = function () {
modalInstance = $uibModal.open({
templateUrl: 'templates/savemixpopup.html',
animate: false,
});
};

$scope.openSignUp = function () {
modalInstance = $uibModal.open({
templateUrl: 'templates/signuppopup.html',
animate: false,
});
};

$scope.closeModal = function () {
modalInstance.close();
modalInstance.dismiss();
};


Expand All @@ -30,7 +32,7 @@ relaxIO.controller('NavCtrl', ['$scope', 'SaveMix', 'LogOut', 'Session', 'SoundS
$scope.saveMix = function () {
var name = $scope.name;
SaveMix.saveMix(name);
modalInstance.closeModal();
$scope.closeModal(modalInstance);

};

Expand Down
2 changes: 2 additions & 0 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
<script src="https://cdn.firebase.com/js/client/2.2.4/firebase.js"></script>
<!-- AngularFire -->
<script src="https://cdn.firebase.com/libs/angularfire/1.1.3/angularfire.min.js"></script>
<!-- Angular Animate-->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular-animate.js"></script>

</head>
<body id="background" class="container">
Expand Down
11 changes: 6 additions & 5 deletions dist/scripts/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var relaxIO = angular.module("relaxIO", ["ui.router", "firebase", "ui.bootstrap", "ngCookies"])
var relaxIO = angular.module("relaxIO", ["ui.router", "firebase", "ui.bootstrap", "ngCookies", "ngAnimate"])

// config states & controllers
.config(function($stateProvider, $locationProvider, $urlRouterProvider) {
Expand Down Expand Up @@ -51,13 +51,14 @@ var relaxIO = angular.module("relaxIO", ["ui.router", "firebase", "ui.bootstrap
url: '/profile',
controller: 'ProfileCtrl',
templateUrl: '/templates/profile.html'
});
relaxIO.run(['Auth', 'UserRestService', function run(Auth, UserRestService) {
});

relaxIO.run(['Auth', 'UserRestService', '$uibModalStack', function run(Auth, UserRestService, $uibModalStack) {

var _user = UserRestService.requestCurrentUser();
Auth.set(_user);
$uibModalStack.dismissAll();

}])
}]);

});
6 changes: 4 additions & 2 deletions dist/scripts/controllers/NavCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ relaxIO.controller('NavCtrl', ['$scope', 'SaveMix', 'LogOut', 'Session', 'SoundS
$scope.openSaveMix = function () {
modalInstance = $uibModal.open({
templateUrl: 'templates/savemixpopup.html',
animate: false,
});
};

$scope.openSignUp = function () {
modalInstance = $uibModal.open({
templateUrl: 'templates/signuppopup.html',
animate: false,
});
};

$scope.closeModal = function () {
modalInstance.close();
modalInstance.dismiss();
};


Expand All @@ -30,7 +32,7 @@ relaxIO.controller('NavCtrl', ['$scope', 'SaveMix', 'LogOut', 'Session', 'SoundS
$scope.saveMix = function () {
var name = $scope.name;
SaveMix.saveMix(name);
modalInstance.closeModal();
$scope.closeModal(modalInstance);

};

Expand Down

0 comments on commit c26bc4f

Please sign in to comment.