'L' has no exported member 'control'. error after running ng test
i use leaflet plugin in my angluar/cli projet.
Versions.
@angular/cli: 1.0.1 node: 6.9.5 os: win32 x64 @angular/common: 4.0.3 @angular/compiler: 4.0.3 @angular/core: 4.0.3 @angular/forms: 4.0.3 @angular/http: 4.0.3 @angular/platform-browser: 4.0.3 @angular/platform-browser-dynamic: 4.0.3 @angular/router: 4.0.3 @angular/cli: 1.0.1 @angular/compiler-cli: 4.0.3
Repro steps.
i have impted some plugins in my componeent, for example leaflet like leaflet, Everything works fine. But when I run the test with ng test, I have errors like
ERROR in MY_COMPONENET.component.ts (14,19): Namespace 'L' has no exported member 'control'.
any idea plz. thx
npm install @types/leaflet?
thx @ddimaria, so i found a solution that I must define the types to export in tsconfig.ts file like
"types": [ "leaflet", "nvd3", ... ],
"typeRoots": [ "leaflet", "dhtmlxscheduler", "nvd3", ... ]
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.