Hello everyone,
I took the Sociogram project will add the login but I get an error : net::ERR_UNKNOWN_URL_SCHEME
My code:
.controller('LoginCtrl', function ($scope, $location, $http, AuthenticationService, OpenFB) {
$scope.model = {};
$scope.model.emailLog = "";
$scope.model.passLog="";
$scope.LoginFormbut = function() {
$scope.login_error = '';
$scope.login_success = '';
//alert(emailLog+' '+passLog);
//alert('dans la boucle');
alert($scope.model.emailLog+' '+$scope.model.passLog);
$http.post('http://UrlMyApi/login',{'email':$scope.model.emailLog,'password':$scope.model.passLog}
).success(function(response, message) {
if (response= 'true')
{
$scope.login_success='success';
alert('bon mdp');
}
else
{
$scope.login_error='Invalid1 Email Address/Password';
}
}).error(function(response, message) {
$scope.login_error='Invalid2 Email Address/Password';
});
};
$scope.facebookLogin = function () {
OpenFB.login('email,read_stream,publish_stream').then(
function () {
$location.path('/app/person/me/feed');
},
function () {
alert('OpenFB login failed');
});
};
})
My alerts are good but i have this error :
net::ERR_UNKNOWN_URL_SCHEME
sendReq ionic.bundle.js:15287
$http.serverRequest ionic.bundle.js:15021
wrappedCallback ionic.bundle.js:18435
wrappedCallback ionic.bundle.js:18435
(anonymous function) ionic.bundle.js:18521
Scope.$eval ionic.bundle.js:19447
Scope.$digest ionic.bundle.js:19273
Scope.$apply ionic.bundle.js:19553
(anonymous function) ionic.bundle.js:37167
(anonymous function) ionic.bundle.js:10086
forEach ionic.bundle.js:7780
eventHandler ionic.bundle.js:10085
ionic.tapElement ionic.bundle.js:2370
onTap ionic.bundle.js:37161
triggerEvent ionic.bundle.js:741
releaseGesture ionic.bundle.js:1937
detect ionic.bundle.js:1319
bindDomOnTouch ionic.bundle.js:868
Anyone have an idea where it may come? my api should return me : {“response”: true,“message”: “”}