Hi & Thank You for Firebase, it's great.
I'm writing a book about deploying AngularJS applications & have a mostly working mash up of the Angularfire-seed & Ionic Framework that will server as an example for the readers to deploy. Everything works as the vanilla Angularfire-seed chat app, except that the login view's use of the ng-cloak directive breaks the login form in the following ways.
Three elements utilize the ng-cloak directive; the Create Account & Cancel buttons & the confirm pass input.
There are no error in the DevTools console for any of the mentioned issues & all necessary dependencies are in place (according to Batarang). I attempted removing all of the Ionic view code & returned the login view to the seed version & the everything works as intended...except that I need this to work within Ionic.
I found the gist for module.simpleLoginTools & am wondering if the mentioned change to ng-cloak is causing this issue when used within the Ionic Framework?
My code can be accessed on GitHub & a deployed example can be accessed @ http://zachariahmoreno.com/portfolio/krakn/#/krakn/home
So it turns out that the issue was not caused by simpleLoginTools at all, they work great. The issue was caused by Ionic's heavy use of isolate scopes that I was unaware of.
$scope.data = {
"email" : null,
"pass" : null,
"confirm" : null,
"createMode" : false
}
The solution was to nest the login credentials inside of a $scope.data object, then modify the login function to fit the new nesting structure.
$scope.login = function(cb) {
$scope.err = null;
if( !$scope.data.email ) {
$scope.err = 'Please enter an email address';
}
else if( !$scope.data.pass ) {
$scope.err = 'Please enter a password';
}
else {
loginService.login($scope.data.email, $scope.data.pass, function(err, user) {
$scope.err = err? err + '' : null;
if( !err ) {
cb && cb(user);
}
});
}
};