Reputation: 967
Does Angular 2 differ a lot, in terms of syntax, from angular 5?
I'm asking because I got on Christmas pretty new book (published at the end of November) about Angular 2 and when I wanted to install required packages via npm, it automatically installed version 5.1.2 of angular, when the book is basing on version 2.0.0.
I wonder if I will be able to normally carry out the examples from the book, or maybe should I downgrade to version 2.0.0?
Actually I don't know if it's a topic for this forum, but I would be very if anybody could answer me.
{
"name": "angular-template",
"version": "1.0.0",
"description": "Template for angular app",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"@angular/common": "^5.1.2",
"@angular/compiler": "^5.1.2",
"@angular/core": "^5.1.2",
"@angular/forms": "^5.1.2",
"@angular/http": "^5.1.2",
"@angular/platform-browser": "^5.1.2",
"@angular/platform-browser-dynamic": "^5.1.2",
"@angular/router": "^5.1.2",
"core-js": "^2.5.3",
"systemjs": "^0.20.19",
"rxjs": "^5.5.6",
"zone.js": "^0.8.18",
"bootstrap": "^3.3.7",
"jquery": "^3.2.1"
},
"devDependencies": {
"typescript": "^2.6.2",
"live-server": "^1.2.0"
}
}
Upvotes: 0
Views: 239
Reputation: 9800
Angular team keep enhancing angular more and more. its started with angular 2.0.0 and today the latest stable release is 7.0.0 (2018-10-18).
So if you want to know each change that is added after each version, you can look at this change log file link:
https://github.com/angular/angular/blob/master/CHANGELOG.md
This way you can for example know what is removed and what feature is added in each version.
You can keep use your book, its probably a good source to learn with, but you can search in that change log file for example to see if a feature is removed or not and use the new one.
So angular 5 (5.1.2 here) is better than angular 2 because it has added many new features and many fixes that angular 2 or 4. and still under development to bring better API and bug fixes and optimizations every new release.
Upvotes: 2