0

am developing an app using nativescript and angular2 with angular2seed advanced. while developing this app face a problem ie,while giving import {nativeScriptBootstrap} from "nativescriptangular/application"; Cannot find module 'nativescript-angular/application'.am new to this how can i solve this issue.Thanks in advance.

package.json

"nativescript-angular": "0.6.0",

1 Answer 1

1

Your nativescript-angular package version is a bit old - a lot of things has been deprecated and a number of breaking changes were introduced in the latest versions of Angular-2 so you should use the latest nativescript-angular version (currently 1.1.2) which is up to date with the latest versions of Angular-2 as well.

With the new versions the bootstrapping of NativeScript app is done with these imports:

import { platformNativeScriptDynamic, NativeScriptModule } from "nativescript-angular/platform";\

...
platformNativeScriptDynamic().bootstrapModule(AppComponentModule);

For example take a look at this sample application or the advanced-seed nativescript app

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for your reply. I gave
I gave platformNativeScriptDynamic().bootstrapModule(NativeModule, [ provide(WindowService, { useClass: WindowNative }) ]); then shows an error cannot find module provide. what should i do?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.