${some_var} 中的$是什么意思
search(term:string) {
let promise = new Promise((resolve, reject) => {
let apiURL = `${this.apiRoot}?term=${term}&media=music&limit=20`;
this.http.get(apiURL)
.toPromise()
.then(
res => { // Success
console.log(res.json());
resolve();
}
);
});
return promise;
}
Run Code Online (Sandbox Code Playgroud) angular ×1