I'm new in AngularJS and I want to use the username and password variables that I get in this controller:
.controller('LoginCtrl', function($scope, LoginService, $ionicPopup, $state, Api) {
$scope.data = {};
$scope.login = function() {
LoginService.loginUser($scope.data.username, $scope.data.password)
.success(function(data) {
$scope.data = {}
$state.go('tabs.extranet');
})
.error(function(data) {
var alertPopup = $ionicPopup.alert({
title: 'Acceso denegado',
template: 'Por favor, compruebe su usuario y/o contraseña'
});
$state.go('tabs.extranet');
});
};
})
Inside this controller
.controller('SaesoTabCtrl', function($scope, $sce, Saeso, Api){
//some code....
}
Thanks