can i build apps with ionic using angular version 1 - angularjs

I want to know that can i use ionic with angular version 1 to builds App.
If yes than which version of ionic will matter in that case, means which version of ionic have to use with angular version 1.
Can i use the latest ionic version with angular version 1.I searched out but did not find any detail answer

Ionic V1 docs supports angular version1. You need to install the Ionic version 2.2.1 and you can use the ionic framework docs v1 in your application with angular 1.
npm install -g ionic#2.2.1
use this command to install ionic.
I hope this will help you.

Related

How to upgrade angularjs version in ionic v1 app

I am looking for a way to upgrade angularjs version in ionic v1 app. Because of Google Play Console Security alert for my applications.
I got SNYK warning and warning is SNYK-npm:angular:20180202.
SNYK suggestion: Upgrade angular to version 1.6.9 or higher.
My question is, how can i upgrade angularjs version in ionic v1 app?
Thanks.
Assuming you have installed bower and can execute bower command, you can update angular lib in your ionic v1 project by using this command:
bower install angular#1.7.8
bower install angular-animate#1.7.8
bower install angular-sanitize#1.7.8
Hope this helps.

Push notifications in Android 8 using IONIC v1

I have an app developed in IONIC v1 and I am using phonegap-plugin-push to receive notifications, my current plugin version is 1.3.1 and when I am checking on Android 8, 9 then I can see that notifications are not coming.
I have checked this plugin's repo and I have read that we need to upgrade this plugin to latest version so I have upgraded plugin from 1.3.1 to 2.1.3 version but my IONIC version is still v1. Ever since I have updated plugin I am getting this error "INVALID_SENDER"
Here are more details:
cordova --version 9.0.0
cordova platform version android 7.1.0
So, main issue is that I have an app in IONIC v1 and I want that users of PIE & Oreo should also get notifications. I don't want to convert whole app to IONIC v2 or v3

How to use Ionic Cloud with Angular 1.5

I've reached a bit of a dead-end and I am not sure how to proceed. I have developed my Web Application on Angular 1.5.9. I have just now ported over my web app to the Ionic App using ionic start app_name. Everything is working as it should. However, my next step is to set-up the deploy and ionic services. At first I tried adding ionic add ionic-platform-web-client. But since its deprecated and from reading the recent docs, I understood I should now use ionic cloud. So I installed ionic cloud using npm install #ionic/cloud-angular --save. I then got the dependency error saying that:
├── UNMET PEER DEPENDENCY #angular/core#^2.1.1 || ^4.0.0
So looking into it further, I realised that I need to have Angular 2 for it and also to complete the ionic cloud configuration, I also need to update the src/app/app.module.ts file. My questions are:
How can I use Angular 2 when I am using Angular 1.5.6 for my Web App? Rewriting my Angular 1.5 app to Angular 2 is not feasible. Can I use both simultaneously? If so, how? How can I resolve this?
Any help will be great since I cannot find any info on using the latest ionic cloud with Angular 1.5. My current set-up is:
Cordova CLI: 6.5.0
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
ios-deploy version: 1.9.1
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v7.9.0
Xcode version: Xcode 8.3.2 Build version 8E2002
Angular: 1.5.9
Ionic Cloud Client can be used with Ionic 1 / Angular 1.5. This is what I did:
Install Ionic Cloud:
npm install #ionic/cloud --save
Copy the files to www/lib directory:
cp node_modules/#ionic/cloud/dist/bundle/ionic.cloud.min.js www/lib
Include the link in your project’s index.html:
<script src="lib/ionic.cloud.min.js"></script>
Set the Platform to assign your app a unique app id and api key:
ionic io init
Install Caodova's deploy plugin:
cordova plugin add ionic-plugin-deploy --save
Inject Deploy dependency ionic.cloud to the Angular module:
angular.module('application', ['ionic.cloud']) ...
Do the Deploy Check using $ionicDeploy inside the .run Block of the Angular 1.5 config file.
.run(function($ionicDeploy) {
$ionicDeploy.check().then(function(snapshotAvailable) {
if (snapshotAvailable) {
// When snapshotAvailable is true, you can apply the snapshot
$ionicDeploy.download().then(function() {
$ionicDeploy.extract().then(function() {
$ionicDeploy.load();
});
});
}
}); // end deploy check
};
Thats it! It was simpler than I though. Here is the link to the Docs for more info: http://docs.ionic.io/setup.html#installation

Where can I find systemjs.config in Ionic 2 Project?

I create an pure Ionic 2 project with the command.
ionic start myIonic --v2
The pure project work great, but when I compared the project structure with angularJS 2, I found the "systemjs.config.js" is missing.
My question is could "systemjs.config.js" file be replaceable?
If the answer is positive, what is the alternative file in Ionic2 based project ?
i have created a angularjs 2 based poject using angular2-cli using below command.
ng new PROJECT_NAME
when i create the project using angular2 cli, then also its not creating systemjs.config.js file.
link for angular2 cli new app .
And Systemjs.config.js file is creating in angular2 project only if i create quick start application, that too we are only creating manually. as given in official quick start document.
link for angular2 quick start app.
So using this 2 examples we can believe that systemjs.config.js file can be replaceable.
The angular-cli and ionic moved the build system from SystemJS to Webpack.
For angular
npm uninstall -g angular-cli
npm cache clean
npm install -g angular-cli#latest
Full angular-cli migrate docs: https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.14

How can I use ng-upgrade in ionic 2 framework

I have a code written in AngularJS1.5 and I want to use this code in another app that will be built on ionic 2 framework. I tried to follow the guidelines of using the ngupgrade module to make the AngularJS1.5 code compatible with ionic 2 framework which uses the AngularJS 2.0.
My question is when using the ngupgrade we must call the bootstrap method from UpgradeAdapter, but the ionic framework calls its own bootrstrap method. So any ideas on how to achieve that?
According to the Ionic Team, ngUpgrade won't work to convert Ionic 1 to Ionic 2:
Ionic1 and Ionic2 will not work with ngUpgrade.

Resources