SHARE
TWEET

Untitled

a guest Dec 13th, 2017 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top