Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created May 6, 2020 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/cbc37b9d2414c380f4b709a404e809ce to your computer and use it in GitHub Desktop.
Save bjoerntx/cbc37b9d2414c380f4b709a404e809ce to your computer and use it in GitHub Desktop.
constructor(http: HttpClient, @Inject('BASE_URL') baseUrl: string) {
this._http = http;
this._baseUrl = baseUrl;
// get data source structure from Web API endpoint 'LoadData'
http.get<any>(baseUrl + 'textcontrol/loaddata').subscribe(result => {
// call JavaScript function from injected 'textcontrol.js'
loadData(result);
}, error => console.error(error));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment