What is the correct method for upgrading Angular Project from V2 -> V7?
I am tasked with upgrading a medium Angular V2.0.1 project to Angular V7.1.4 (latest stable version). I have worked with Angular a lot in the past and upgraded from V2 -> V4 and V4 -> V5 for a different Angular project in the past. These upgrades were not always trivial and had breaking changes. After doing some research I stumbled upon the Angular Upgrade Guide (https://update.angular.io/) which seems like a good place to start. I also stumbled upon (Upgrading Angular 2 to Angular 6) and in the comments someone says I should start a new project using Angular CLI and move the code over manually.
Another thing to note is that the 2.0.1 project uses systemjs (because it was created from the original Angular Quickstart). Ideally we would make the switch over to webpack.
Should I create a new project using Angular CLI and copy the code over and try to fix bugs that way or should I follow the Angular Update Guide and stay within the same project?

add a comment |
I am tasked with upgrading a medium Angular V2.0.1 project to Angular V7.1.4 (latest stable version). I have worked with Angular a lot in the past and upgraded from V2 -> V4 and V4 -> V5 for a different Angular project in the past. These upgrades were not always trivial and had breaking changes. After doing some research I stumbled upon the Angular Upgrade Guide (https://update.angular.io/) which seems like a good place to start. I also stumbled upon (Upgrading Angular 2 to Angular 6) and in the comments someone says I should start a new project using Angular CLI and move the code over manually.
Another thing to note is that the 2.0.1 project uses systemjs (because it was created from the original Angular Quickstart). Ideally we would make the switch over to webpack.
Should I create a new project using Angular CLI and copy the code over and try to fix bugs that way or should I follow the Angular Update Guide and stay within the same project?

add a comment |
I am tasked with upgrading a medium Angular V2.0.1 project to Angular V7.1.4 (latest stable version). I have worked with Angular a lot in the past and upgraded from V2 -> V4 and V4 -> V5 for a different Angular project in the past. These upgrades were not always trivial and had breaking changes. After doing some research I stumbled upon the Angular Upgrade Guide (https://update.angular.io/) which seems like a good place to start. I also stumbled upon (Upgrading Angular 2 to Angular 6) and in the comments someone says I should start a new project using Angular CLI and move the code over manually.
Another thing to note is that the 2.0.1 project uses systemjs (because it was created from the original Angular Quickstart). Ideally we would make the switch over to webpack.
Should I create a new project using Angular CLI and copy the code over and try to fix bugs that way or should I follow the Angular Update Guide and stay within the same project?

I am tasked with upgrading a medium Angular V2.0.1 project to Angular V7.1.4 (latest stable version). I have worked with Angular a lot in the past and upgraded from V2 -> V4 and V4 -> V5 for a different Angular project in the past. These upgrades were not always trivial and had breaking changes. After doing some research I stumbled upon the Angular Upgrade Guide (https://update.angular.io/) which seems like a good place to start. I also stumbled upon (Upgrading Angular 2 to Angular 6) and in the comments someone says I should start a new project using Angular CLI and move the code over manually.
Another thing to note is that the 2.0.1 project uses systemjs (because it was created from the original Angular Quickstart). Ideally we would make the switch over to webpack.
Should I create a new project using Angular CLI and copy the code over and try to fix bugs that way or should I follow the Angular Update Guide and stay within the same project?


asked Jan 3 at 1:27
Kevin QuiringKevin Quiring
144418
144418
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I do not recommend you jump from v2 to v7. You should go from v2 to v5 and update to v7. Making sure the project is stable before proceeding to the next update.
There is an online tool to assist you in updating.
https://update.angular.io/
The ng update
tool requires that the project is using an up to date angular.json
file for configuration. It is far easier to create one via a new project than to create one manually. I don't think this file was introduced until Angular 5.
You can use the above website as a guide to update to v5, but the update is going to require that you manually update the source code. Once you are at a stable v5 you can run the ng update
tool and it will automate some of the upgrade process for you.
Good luck!
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54015248%2fwhat-is-the-correct-method-for-upgrading-angular-project-from-v2-v7%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I do not recommend you jump from v2 to v7. You should go from v2 to v5 and update to v7. Making sure the project is stable before proceeding to the next update.
There is an online tool to assist you in updating.
https://update.angular.io/
The ng update
tool requires that the project is using an up to date angular.json
file for configuration. It is far easier to create one via a new project than to create one manually. I don't think this file was introduced until Angular 5.
You can use the above website as a guide to update to v5, but the update is going to require that you manually update the source code. Once you are at a stable v5 you can run the ng update
tool and it will automate some of the upgrade process for you.
Good luck!
add a comment |
I do not recommend you jump from v2 to v7. You should go from v2 to v5 and update to v7. Making sure the project is stable before proceeding to the next update.
There is an online tool to assist you in updating.
https://update.angular.io/
The ng update
tool requires that the project is using an up to date angular.json
file for configuration. It is far easier to create one via a new project than to create one manually. I don't think this file was introduced until Angular 5.
You can use the above website as a guide to update to v5, but the update is going to require that you manually update the source code. Once you are at a stable v5 you can run the ng update
tool and it will automate some of the upgrade process for you.
Good luck!
add a comment |
I do not recommend you jump from v2 to v7. You should go from v2 to v5 and update to v7. Making sure the project is stable before proceeding to the next update.
There is an online tool to assist you in updating.
https://update.angular.io/
The ng update
tool requires that the project is using an up to date angular.json
file for configuration. It is far easier to create one via a new project than to create one manually. I don't think this file was introduced until Angular 5.
You can use the above website as a guide to update to v5, but the update is going to require that you manually update the source code. Once you are at a stable v5 you can run the ng update
tool and it will automate some of the upgrade process for you.
Good luck!
I do not recommend you jump from v2 to v7. You should go from v2 to v5 and update to v7. Making sure the project is stable before proceeding to the next update.
There is an online tool to assist you in updating.
https://update.angular.io/
The ng update
tool requires that the project is using an up to date angular.json
file for configuration. It is far easier to create one via a new project than to create one manually. I don't think this file was introduced until Angular 5.
You can use the above website as a guide to update to v5, but the update is going to require that you manually update the source code. Once you are at a stable v5 you can run the ng update
tool and it will automate some of the upgrade process for you.
Good luck!
answered Jan 3 at 3:35


cgTagcgTag
24.5k864114
24.5k864114
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54015248%2fwhat-is-the-correct-method-for-upgrading-angular-project-from-v2-v7%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown