I would like to develop applications using Ionic 2, but now I am working with angularJS1 with Ionic1.
I feel that AngularJs 1 is comfortable for me but not AngularJS 2, so is there any way to work with Ionic 2 and AngularJS 1?
Unfortunately, no.
Ionic 2 is based on the new 2.x (and higher) version of AngularJS, and comes with many significant performance, usability, and feature improvements.
Ionic (1) at a very high-level is essentially just a wrapper & directive/component library for AngularJS (1). In that same regard, Ionic 2 is built in the same way, utilizing all the benefits of Angular 2+.
So basically, everything must be upgraded in order to get the benefits of Ionic 2. If everything you have is working, and performance isn't sluggish, there really is no reason to upgrade it, maybe if you were starting a new project (or the current project you have is small and it would be easy)
Ionic 2 breaks away from being tied to the DOM in the browser, by using angular 2 which is the reason for the massive change between ionic 1.x and ionic 2.x. ( Angular 2.x architecture is not tied down to the DOM unlike the Angular 1.x ).
Although that means having to relearn and unlearn a lot of angular 1.x stuff, but this is a fundamental change that the ionic team has taken up in order to break away from the performance issues that has plagued ionic 1 and certainly well worth it. Now that the ionic 2 platform is stable well almost and certainly far better in performance to ionic 1, migrating is certainly a recommended option.
You can use Angular js 2 and Ionic 2 RC for your development.
https://scotch.io/tutorials/build-a-mobile-app-with-angular-2-and-ionic-2
Scotch
Build a Mobile App with Angular 2 and Ionic 2
Update (September 30, 2016): Update article to recent ionic RC.0 releaseThis article has been updated to use Ionic 2 RC.0 ReleaseThe Ionic Framework... (33KB)
Since Ionic 2 RC will be forward compatible with Ionic 2 official release
Most of the time Enterprise will wait till an official release comes out
but RnD developers use RC packages also
you dnt have to worry..
Related
Given that Google is stopping support for AngularJs, I want to know what will happen if I don't migrate my project to Angular?
I am aware that any bugs in the framework will not be fixed.
I have a Cordova app built using Angular 1 i.e. Angular JS. How I can upgrade the app yo latest angular version.
Will it require complete code re-write to TypeScript (TS)??
TypeScript is not a requirement for writing Angular 2+. However, Angular 2-7 does not have much in common with AngularJS as it doesn't have the same architecture or components. For example, from what i've read about it, AngularJS used a MVC model, Angular2+ does not.
So to answer your question, you will indeed need to rewrite most of your application. Going from Angular 2 to 7 is much easier as not much has changed.
We currently have a web app based on AnjularJS 1.4. Now we need to develop mobile apps for our product. We think ionic to be a good framework for us since it's Angular based.
The team has no experience on ionic framework. Now the question is which version of ionic should we use? How to convert one AngularJS 1.4 we app into ionic mobile apps and maximize code reuse? Ionic 2 seems to have better performance and other benefits. Is it possible to make ionic 2 and AngularJS 1.4 coexists in the same code base and reuse current code?
There is no straight way to do it. Ionic 2 is based on Angular 2, and comes with many significant performance, usability, and feature improvements.
Ionic 1 at a very high-level is essentially just a wrapper & directive/component library for AngularJS 1.x. Ionic 2 is built to utilize all the benefits of Angular 2+.
In short, everything must be upgraded in order to get the benefits of Ionic 2. So, If everything you have is working, and performance isn't sluggish, there really is no reason to to choose Ionic 2, you can use Ionic 1.
You need to port your code to Angular 2 in order to run with Ionic 2 because Ionic 2 builds upon AngularJs 2.
It takes Angular 2 and adds additional features, like different routing, styles, etc.
I am very new to Angular 2 and would like to know if Angular 1 plugins can be used in Angular 2. I have used ng-knob in ionic 1 app. Some suggested to use jQuery knob instead but I really want to use ng-knob as it has many more options.
Is it possible to use ng-knob in angular 2? Even if there is a harder way I would not hesitate to try it but I really wan't to use ng-knob.
Any help with sample code is greatly appreciated.
As Angular2 framework is different from Angular1 framework, I'm afraid to say that you can't use Angular1 plugin(s) for Angular2.
Angular2 is a new framework and recently became stable. So, if you are looking for Angular2 plugin(s), its very hard to find them(as of now) as community is still developing Angular2 plugin(s).
Check out the Upgrading with The Upgrade Adapter section in angular.io - point 2 and other sections till 8.
https://angular.io/docs/ts/latest/guide/upgrade.html
Use angular.umd.js file instead of angular.dev.js or angular.js for 2.x. It supports both angular1 application and angular2 application to run side by side. This way you can use 1.x plugin with angular 1.x application and still run angular 2.x application side by side. You can use Zone.js to merge two way binding between angular 1.x application and 2.x application.
But this can be complex and if you are not comfortable with advanced hacks, you should take the answer of using 1.x plugins in 2.x versions. Unless you are ready to port your 1.x plugin to 2.x plugin yourself.
Zone.js intro - https://www.youtube.com/watch?v=V9Bbp6Hh2YE Good resource from Misko.
I've been trying to develop a glossary app in Ionic 2 and when I got to using the http service, it all went to hell. Angular 2 tutorials were changed, the mock server couldn't be set up, and Ionic 2 documentation wasn't of much help. I tried updating dependencies to latest versions, to try to build things according to the newest tutorials, but I couldn't make that work either because some of the classes required throughout the code just weren't getting exported anywhere.
Would you recommend waiting until everyone catches up with one another, or just trying to continue the development with older versions? How am I supposed to make all this work?
Since Ionic 2 builds upon Angular 2 it seems viable to suggest to just wait for Ionic 2 to integrate the final version of Angular 2, if youre not working on a production app right now.
The latest beta of Ionic uses Rc4 of Angular 2,but rumors say the RC version of Ionic is just around the corner with AngularConnect event.