Just put the modal in the controller like this
> .controller('authentication', function($scope, $ionicModal){
> console.log("I am now in the authentication mode...")
> // Create the login modal that we will use later
> $ionicModal.fromTemplateUrl('templates/login.html', {
> scope: $scope
> }).then(function(modal) {
> $scope.modal = modal;
> });
> // Triggered in the login modal to close it
> $scope.closeLogin = function() {
> $scope.modal.hide();
> };
> // Open the login modal
> $scope.login = function() {
> $scope.modal.show();
> };
> })