Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. My service
  2.  
  3. (function(){
  4. angular.module('desktopApp').service('marketingService',function($http,$q){
  5.  
  6. var portopc = location.port.length>0 ? location.port : "";
  7. var urlcoremetrics = window.location.protocol+"//"+window.location.hostname+ ":" + portopc + '/'+ "scripts/controllers/Marketing.json";
  8. var salida="";
  9.  
  10. this.MostrarNombre = function()
  11. {
  12.  
  13. var club = this;
  14. club.team = [];
  15. $http.get(urlcoremetrics).success(function(data) {
  16. club.team = (data.coremetricslabel);
  17. alert (club.team);
  18.  
  19. });
  20.  
  21. return club.team;
  22. };
  23.  
  24. });
  25.  
  26. })();
  27.  
  28.  
  29. My Controller the calling
  30.  
  31. marketingService.MostrarNombre();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement