简体   繁体   中英

Getting started with Angular 2 and Nativescript development on angular-seed-advanced by Nathan Walker?

I have started experiments with angular-advanced -seed by Nathan Walker based on angular-seed by Minko Gechev.I created another component called settings and created basic routing in this seed and find out how it works. I have some doubts:

  1. Is it possible to execute and show angular 2 based dependencies on native platforms?

  2. How is this seed differ from normal apps generated using Native script CLI?

  3. Is to possible to apply lazy loading common for all platforms?

  4. Any other starter angular 2 based boilerplates to kickstart development on the web and native platforms?

Answer to question 1:

No, your existing web (sub) components in HTML won't work with NativeScript.

You will need to redefine the view (template) from HTML to NativeScript XML and possibly use plugins.

In addition, you will likely need to rewrite some of the code in existing Angular components if you have tight coupling between components and existing HTML views.

Answer to question 2:

The NativeScript CLI will generate different code depending on what template you specify on the command line.

Answer to question 3:

Yes, you can create a reusable service layer component and, for example, use RXJS https://stackoverflow.com/a/41554338/882912

Answer to question 4:

https://github.com/NativeScript/sample-Groceries

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM