angular.module(‘ionicApp’, [‘ionic’])
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state(‘home’, {
url: “/home”,
templateUrl: “home.html”,
controller: “HomeTabCtrl”,
})
$urlRouterProvider.otherwise(“/home”);
})
.controller(‘HomeTabCtrl’, function($scope, $ionicModal) {
// Load the modal from the given template URL
$ionicModal.fromTemplateUrl(‘modal.html’, {
scope: $scope,
animation: ‘slide-in-up’
}).then(function(modal) { $scope.modal = modal; });
$scope.modal2 = $ionicModal.fromTemplate(‘
I\’m A Modal
</header><content has-header=”true” padding=”true”><p>This is a modal</p></content></div>’, {
scope: $scope,
animation: ‘slide-left-right’
});
});