Created
April 12, 2017 18:06
-
-
Save ronaiza-cardoso/4d71b8406a4dadb610030fadf88e59c6 to your computer and use it in GitHub Desktop.
Service to import global vars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
// Declare LoadingService as a provider in app.module.ts | |
// Inject LoadingService in your class: constructor(private globalUrls: GlobalUrls){} | |
// Use the this.globalUrls.SERVER_URL to instantiate your variable | |
@Injectable() | |
export class GlobalUrls { | |
SERVER_URL: string = '' | |
constructor() { | |
this.SERVER_URL = 'http://186.216.192.246:8081/homolog/sgtweb/transapp.php'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment