Sharing Code Between Web and Mobile Native Apps
summary
Shows how Angular + NativeScript let one repository produce web and native iOS/Android builds by sharing TypeScript business logic and swapping platform pieces. Uses a monorepo with a file convention .tns.html /.tns.ts convention (Webpack picks .tns files) and DI to provide web HttpClient or NativeScript HTTP client. Provides schematics to scaffold and migrate projects and components via ng g @nativescript/schematics and ng migrate commands. Demo app reuses a single ~170-line user service and a Petfinder API integration; discusses wrapper vs adapter approaches for mismatched plugin APIs.
AI-written summary · about
chapters (8)
- 0:00Introduction to code sharing
- 1:09What is NativeScript
- 4:18Project structure for code sharing
- 8:34Demo of Petfinder app
- 15:40Challenges in code sharing
- 18:10Migrating existing projects
- 22:46Demo of migration schematics
- 26:28Closing and Q&A
related talks
41mSharing Code between Web and Native Apps with Angular and NativeScript.
01h 09mSharing Code between Mobile Apps with Angular and NativeScript
36mSharing Code Between Web and Native Apps
27mFrom Web to Mobile with NativeScript and Angular
52mOne Source to Rule them All
25mOne Source to Rule them All
22mNativeScript and CodeSharing
31mFrom web to mobile with NativeScript and Angular
