I have a file name service.imports.ts
having following code.
export { Http, Response, Headers, RequestOptions } from '@angular/http'
export { Observable } from 'rxjs/Observable'
export { Injectable } from '@angular/core';
export * from 'rxjs/add/operator/map';
export * from 'rxjs/add/operator/catch';
and call that file in my angular 2 service.ts file by
import { Http } from '../service.imports'
As you can see i am only calling Http
module and ignoring Response, Headers, RequestOptions
.
how angular 2 handles this situation? will it load all the modules mentioned in service.imports.ts
or it only loads the modules which are being called where that service.imports.ts
is used i.e only Http
?
I have the performance concern.