Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify the angular version while creating ionic application

I am trying to develop an application using Mobilefirst with Ionic framework. I found that this application uses angular-5. But I know only AngularJS. Is there any command to specify the angular version while creating ionic app.

like image 445
RakeshSharma227 Avatar asked Mar 06 '23 11:03

RakeshSharma227


2 Answers

If you really want to install Ionic 1 for your AngularJS development you can use npm to choose that version like this:

npm install -g [email protected]

If you want to get the old docs you can do that here but I really think you should try and upgrade to angular2+ and use the latest ionic. You can learn more about migrating to angular2 here.

like image 86
AntonioGarcía Avatar answered Mar 18 '23 12:03

AntonioGarcía


If you want to use AngularJS for your ionic development, then you need to start your project with the flag ionic1, choose template

ionic start myProjectName --type ionic1

move into the project and run

ionic serve

Already done the above steps but wanted to Choose specific version: If you wanted to use a sepcific version of AngularJS v1, within your project directory simply update your bower.json.

  "dependencies": {
    "angular": "^1.6.10",
    "angular-mocks": "^1.6.10"
  }
like image 28
Rahul R Avatar answered Mar 18 '23 12:03

Rahul R