Reputation: 965
AngularJS website states :
Develop Across All Platforms
Learn one way to build applications with Angular and reuse your code and abilities to build apps for any deployment target. For web, mobile web, native mobile and native desktop.
From what I have tested, Ionic Framework (based on Angular 2) allows the creation of iOS, Android and Windows Phone application with the same codebase, but I never seen any example of the same codebase for web, mobile web, native mobile and native desktop applications. Moreover, Ionic Framework is made for native mobile applications and should not be used for web and desktop apps, so there should be two different views, one with Ionic, another with Bootstrap/Foundation/insert your favorite CSS framework here
.
Is it possible to write a single AngularJS application for the web, mobile web, native mobile and native desktop, all with the same codebase ? If yes, how? And if not, how can I reuse the code (everthing not related to the view) to achieve this while maintaining a single project by target platform?
Upvotes: 3
Views: 471
Reputation: 2307
This is a rather old question but, for those who can still be interested in this topic:
https://jlooper.github.io/angular-starter/
The Angular Multi-Platform Starter is a template for building apps that run across the web, native mobile (using NativeScript), and for desktop (using Electron).
An alternative is here:
https://github.com/NathanWalker/angular-seed-advanced
Featured in this article:
https://developer.telerik.com/featured/building-angular-2-web-native-apps-single-codebase/
I did not tried neither of them yet so I cannot comment about their actual usability.
Upvotes: 2