Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

avoid hitting multiple same api hits angular

@Injectable()
export class SomeService {

  constructor(
    private http: Http
    ) {
  }

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

}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #avoid #hitting #multiple #api #hits #angular
ADD COMMENT
Topic
Name
8+5 =