Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

angular service await for data

 get_details(id_Course: number,str: string) {
    let promise = new Promise((resolve, reject) =>{
      let apiURL = this.APIUrl+'Units/UnitsDetails/'+id_Course;
      this.httpClient.get(apiURL).toPromise()
      .then(
        res =>{ 
          console.log(res);
        }
       
      )
    })
  return promise; 
Source by www.techiediaries.com #
 
PREVIOUS NEXT
Tagged: #angular #service #await #data
ADD COMMENT
Topic
Name
1+1 =