Know-how
  • Level UP ^
  • Xây dựng 1 ứng dụng Angular___BestPractice1
  • .Net framework
  • Build app with abp modulezero
  • Quản lý token trong aspnet web api
  • Xử lý ảnh với imageprocessor
  • Sms Provider For Two-factor authentication
  • Xử lý callback function khi server đéo bật CORS
  • Angular6.1 công bố chính thức tháng 7 năm 2018
  • Vài note trong entity framework core project
  • Những thứ đã upgrade trong netcore 2.1
  • Solution SQL Database Image Storage & Easy Thumbnails
  • Solution SQL Database Comments and Likes in database
  • Method guide (SQL DESIGN)
  • Paging Model Dto
  • Làm việc với Data table Grid
  • Jquery Extensions
  • A helper library for async/await.
  • oDATA TRONG DONET, RESTER framework
  • Validate dotnetcore use bootstrap 3 css
  • dynamically-loading-components-with-angular
  • Angular Sercurity
  • Add sercurity header for dotnetcore
  • Làm quen và cài đặt Golang (Iris framework)
  • Entity framework 6 - Entity maping to Stored Procedures
  • Angular Security - Authentication With JSON Web Tokens (JWT): The Complete Guide
  • Sql filestream
  • Một vài câu hỏi test Full-stack engineer (JavaScript)
Powered by GitBook
On this page
  • Một giải pháp Upgrade từ angular 5 tới angular 6 sử dụng https://update.angular.io/
  • Angular Update Guide | 5.2 -> 6.0 for Advanced Apps
  • Trước khi cập nhật
  • Trong khi cập nhật
  • Sau khi cập nhật

Angular6.1 công bố chính thức tháng 7 năm 2018

Xem tại đây: https://github.com/angular/angular/blob/master/CHANGELOG.md

PreviousXử lý callback function khi server đéo bật CORSNextVài note trong entity framework core project

Last updated 6 years ago

Nâng cấp dự án từ Angular5 lên Angular6 thì làm thế nào?

Xem giải pháp ở đây:

Một giải pháp Upgrade từ angular 5 tới angular 6 sử dụng

Angular Update Guide | 5.2 -> 6.0 for Advanced Apps

Trước khi cập nhật

Thay thế các provinderdowngradeComponent, downgradeInjectable, UpgradeComponent, and UpgradeModuleimported from @angular/upgrade. Instead use the new versions in @angular/upgrade/static

If you import any animations services or tools from @angular/core, you should import them from @angular/animations

Replace ngOutletContext with ngTemplateOutletContext.

Replace CollectionChangeRecord with IterableChangeRecord

Anywhere you use Renderer, now use Renderer2

If you use preserveQueryParams, instead use queryParamsHandling

If you use DOCUMENT from @angular/platform-browser, you should start to import this from @angular/common

Anywhere you use ReflectiveInjector, now use StaticInjector

Choose a value of off for preserveWhitespaces in your tsconfig.json to gain the benefits of this setting while the default is still to preserve whitespace.

Trong khi cập nhật

Update any scripts you may have in your package.json to use the latest Angular CLI commands. All CLI commands now use two dashes for flags (eg ng build --prod --source-map) to be POSIX compliant.

Update all of your Angular framework packages to v6, and the correct version of RxJS and TypeScript. ng update @angular/core After the update, TypeScript and RxJS will more accurately flow types across your application, which may expose existing errors in your application's typings

In Angular Forms, AbstractControl#statusChanges now emits an event of PENDING when you call AbstractControl#markAsPending. Ensure that if you are filtering or checking events from statusChanges that you account for the new event when calling markAsPending.

If you use totalTime from an AnimationEvent within a disabled Zone, it will no longer report a time of 0. To detect if an animation event is reporting a disabled animation then the event.disabledproperty can be used instead.

ngModelChange is now emitted after the value/validity is updated on its control instead of before to better match expectations. If you rely on the order of these events, you will need to begin tracking the old value in your component.

Update Angular Material to the latest version. ng update @angular/material This will also automatically migrate deprecated APIs.

Use ng update or your normal package manager tools to identify and update other dependencies.

Sau khi cập nhật

Once you and all of your dependencies have updated to RxJS 6, remove rxjs-compat.

Switch from HttpModule and the Http service to HttpClientModule and the HttpClientservice. HttpClient simplifies the default ergonomics (You don't need to map to json anymore) and now supports typed return values and interceptors. Read more on

Make sure you are using

Update your Angular CLI globally and locally, and migrate the configuration to the by running the following: npm install -g @angular/cli npm install @angular/cli ng update @angular/cli

If you have TypeScript configured to be strict (if you have set strict to true in your tsconfig.json file), update your tsconfig.json to disable strictPropertyInitialization or move property initialization from ngOnInit to your constructor. You can learn more about this flag on the .

Remove deprecated RxJS 6 features using . For most applications this will mean running the following two commands: npm install -g rxjs-tslint rxjs-5-to-6-migrate -p src/tsconfig.app.json

angular.io
Node 8 or later
new angular.json format
TypeScript 2.7 release notes
rxjs-tslint auto update rules
https://stackoverflow.com/questions/48970553/want-to-upgrade-project-from-angular-v5-to-angular-v6
https://update.angular.io/
Cái này chụp từ site https://update.angular.io/