Did not modify the course content (not approved by Pluralsight), only added updated code for Angular v14.
List of changes:
-
Update to Angular v14
- Strict typing is on by default.
- Every variable must be initialized when declared.
- Types must be provided when they cannot be inferred.
- Forms changed syntax to access errors collection:
*ngIf="productCodeVar.errors?.['required']"
- Boilerplate files such as tsconfig and angular.json as generated by the Angular CLI v14.
- tsLint is no longer supported by Angular.
- Strict typing is on by default.
-
Update to RxJS 7
- All imports are now from 'rxjs'.
- Subscribe signature changed.
-
Update to Bootstrap 5
- Many of the class names were changed.
- Validation classes were changed.
See the course notes for the module by module details for coding along with Angular v14.
Did not modify the course content, only added update code for Angular v8.
List of changes:
- Update to Angular v8
- Slight changes to boilerplate files such as tsLint and tsconfig as generated by the Angular CLI v8.
- New (in v8) syntax for lazy loading:
loadChildren: () => import('./products/product.module').then(m => m.ProductModule)
- New (in v7) syntax for registering a service with the application injector:
@Injectable({ providedIn: 'root' })
- New (in v8) flag for ViewChild (read more here: https://angular.io/guide/static-query-migration):
@ViewChild(NgForm, { static: true }) editForm: NgForm;
- Changed to the new (in v6) pipeable operator syntax for Observables:
return this.http.get<IProduct[]>(this.productsUrl) .pipe( tap(data => console.log(JSON.stringify(data))), catchError(this.handleError) );
- Changed
subscribe
to use a single parameter. The multiple parameter overloads are being depricated:.subscribe({ next: product => this.onProductRetrieved(product), error: err => this.errorMessage = err });
- Minor modifications to pass the new linter (removing extraneous data types, etc)
- Update to Bootstrap 4
- Affected almost all HTML files
- Bootstrap 4 no longer has glyphs, changed to Font-Awesome
- Move of images to local assets folder (instead of third-party site)