avoid hitting multiple same api hits angular

The solution for “avoid hitting multiple same api hits angular” can be found here. The following code will assist you in solving the problem.

@Injectable()
export class SomeService {

constructor(
private http: Http
) {
}

get(id: number) {
return this.http.get(‘http://somedomain/somemodel/${id}.json’);
}

}

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in