slam4:richclient:angularjs:project:openbeerdatabase:rest

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
slam4:richclient:angularjs:project:openbeerdatabase:rest [2015/03/23 14:25] – [1- Connexion] jcheronslam4:richclient:angularjs:project:openbeerdatabase:rest [2019/08/31 14:21] (Version actuelle) – modification externe 127.0.0.1
Ligne 19: Ligne 19:
 {connected: false}</sxh> | {connected: false}</sxh> |
  
-<html><div class="note"></html> +<html><div class="note"><div id="myContainer">
 <h3>Exemple de connection avec Angular :</h3> <h3>Exemple de connection avec Angular :</h3>
 +</html>
 <sxh javascript;title:Connexion> <sxh javascript;title:Connexion>
  
-data.posted={"mail":"admin@local.fr","password","0000"};+data.posted={"mail":"admin@local.fr","password":"0000"};
 this.connect(data,function(d){console.log("Connexion réussie, token : "+d.token)}); this.connect(data,function(d){console.log("Connexion réussie, token : "+d.token)});
  
Ligne 42: Ligne 41:
 } }
 </sxh> </sxh>
-<html></div></html> +<html> 
 +<h3>Conserver la session (PHP) avec Angular :</h3> 
 +Il suffit de décommenter la ligne <strong>withCredentials = true</strong> dans le fichier <strong>js/config.js</strong> 
 +</html> 
 +<sxh javascript;title:js/config.js;highlight:[3]> 
 +module.exports=function($routeProvider,$locationProvider,$httpProvider) { 
 + //$httpProvider.defaults.useXDomain = true; 
 + $httpProvider.defaults.withCredentials = true; 
 +</sxh> 
 +<html></div></div></html>
 ===== -- Brasseurs ===== ===== -- Brasseurs =====
  
  • slam4/richclient/angularjs/project/openbeerdatabase/rest.1427117133.txt.gz
  • Dernière modification : il y a 6 ans
  • (modification externe)