12345678910111213141516171819202122232425262728 |
- (function (app) {
- app.controller('addCtrl', ["$scope", "$state", "storage", "myService", "msg", "$ionicTabsDelegate", "$ionicNavBarDelegate", "$ionicModal", "$ionicHistory"
- , function ($scope, $state, storage, myService, msg, $ionicTabsDelegate, $ionicNavBarDelegate, $ionicModal, $ionicHistory) {
- $ionicModal.fromTemplateUrl('my-modal.html', {
- scope: $scope,
- animation: 'slide-in-up'
- }).then(function (modal) {
- $scope.modal = modal;
- });
- $scope.openModal = function () {
- $scope.modal.show();
- };
- $scope.closeModal = function () {
- $scope.modal.hide();
- };
- $scope.$on('$ionicView.beforeEnter', function (viewResult) {
- $ionicTabsDelegate.showBar(false);
- $ionicNavBarDelegate.showBackButton(true);
- });
- $scope.$on('$ionicView.leave', function () {
- $ionicTabsDelegate.showBar(true);
- });
- $scope.goback = function () {
- $ionicHistory.goBack();
- }
- }]);
- })(angular.module('app.controllers'));
|