Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
app.factory('$modalLogin', [
'$ionicModal',
'$rootScope',
'$ionicLoading',
'$log',
function(
$ionicModal,
$rootScope,
$ionicLoading,
$log
){
var objModal = null;
var init = function(){
$log.log('## CARREGANDO MODAL LOGIN');
$ionicModal.fromTemplateUrl('/templates/core/acesso/login-modal.html', {
animation: 'slide-in-up'
}).then(function(modal) {
objModal = modal;
});
};
return {
show : function(){
$ionicLoading.show();
if(objModal === null) init();
var _w = $rootScope.$watch(function(){ return objModal; }, function (newVal) {
if(newVal !== null){
$ionicLoading.hide();
newVal.show();
_w();
}
});
},
hide : function(){
objModal.hide();
}
};
}])
Copy link

ghost commented Jun 24, 2015

alancpazetto Podemos trocar um papo? Estou tendo problemas com modal e route em um app.
Caso tenha tempo podemos os falar por skype: tiagofly@outlook.com

Obrigado pela atenção!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment