Hello,

how do I connect the Angularjs in an api?

my api call a function !!

$username = $app['request']->server->get('PHP_AUTH_USER', false);
    $password = $app['request']->server->get('PHP_AUTH_PW');

    if (($app['config']['auth']['user'] != $username) && 
($app['config']['auth']['password'] != $password) ) {

        $response = new Response();
        $response->headers->set('WWW-Authenticate', sprintf('Basic 
realm="%s"', 'site_login'));
        $response->setStatusCode(401, 'Please sign in.');
        return $response;

    }


thanks for help !!

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to