-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working with Angular2/Typescript? #9
Comments
Are u referencing |
I do have the same in plain javascript as well |
iOS or Android, and are you doing this before |
I'm doing it in the constructor without issues. Might want to try moving it there, although I tried with ngInit and it worked fine there as well. |
I'm having the same issue on Android only with plain javascript: |
|
Got it. I think the problem was that I forgot to add <service android:name="com.mapbox.mapboxsdk.telemetry.TelemetryService" /> to my |
I'm trying to use this plugin in an angular 2 typescript project.
I added the plugin via the
tns plugin add
command and imported it withvar mapbox = require('nativescript-mapbox');
in my component.ts file.In the angular 2
ngOnInit
event i callmapbox.show({ accessToken: '...' });
but i'm getting the following error:Uncaught (in promise): TypeError: Cannot read property 'mapboxsdk' of undefined
Any idea how to solve this?
The text was updated successfully, but these errors were encountered: