angular-upgrade

Upgrade angular 4 to 7 @angular/http to @angular/common/http

大憨熊 提交于 2019-12-22 10:53:16
问题 Currently, I am upgrading my Angular project4 using webpack to Angular7. I stuck in one step Switch from HttpModule and the Http service to HttpClientModule and the HttpClient service. HttpClient simplifies the default ergonomics (You don't need to map to json anymore) and now supports typed return values and interceptors. About this step I need to replace from rom HttpModule and Http to HttpClientModule and HttpClient . Update from Http to HttpClient , are there any script to help like $rxjs

How to upgrade from Angular 4.2.4 to Angular 4.3

旧巷老猫 提交于 2019-12-21 06:49:07
问题 I'm using angular 4.2.4 in my application and I want to upgrade to the latest one (4.3.0) is there an easy and safe way to do that without breaking my application ? When searching I found this information from: http://angularjs.blogspot.de/2017/07/angular-43-now-available.html that link states that Angular 4.3 contains no breaking changes ? I want to do that upgrade to use HttpClient 回答1: I think you should be fine. Once you reference the new packages just make sure that your ng build --prod

how to create wrapper directives for Controller in AngularJS

怎甘沉沦 提交于 2019-12-20 05:49:30
问题 I'm trying to do upgrade controllers/components written in AngularJS1 to Angular6. I'm taking the approach of having the wrappers for all the existing AngularJS1 controllers/component by extending "UpgradeComponent" placed under the folder "directive-wrappers" in my example. We have many controllers written in AngularJS1 which need to upgraded and used inside Angular6 application. Since these controllers are bit complex we don't want to rewrite it or touch these controllers, instead we want

Angular CLI with Hybrid app ng-build

十年热恋 提交于 2019-12-11 04:39:51
问题 I'm currently upgrading an AngularJS app to an Angular app, using Angular CLI. My problem is that when I build the app using ng build , it would copy all the files to the dist folder but will ignore all the AngularJS files. For all the js files, my solution was to add them to the scripts array in the angular-cli.json . Now, I just need to handle the html files. For the Angular app, angular cli will handle them automatically for me, but the AngularJS ones will stay outside the dist folder. A

Using AngularJS service inside Angular

ぐ巨炮叔叔 提交于 2019-12-11 01:36:29
问题 I'm searching for include AngularJS service inside Angular project. This is my main.ts: import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; import {AppModule} from './app/app.module'; import {UpgradeModule} from "@angular/upgrade/static"; import {environment} from './environments/environment'; platformBrowserDynamic().bootstrapModule(AppModule) .then(ref => { const upgrade = ref.injector.get(UpgradeModule) as UpgradeModule; upgrade.bootstrap(document.body, ['dmdWorkplace

How to upgrade from Angular 4.2.4 to Angular 4.3

情到浓时终转凉″ 提交于 2019-12-03 22:47:19
I'm using angular 4.2.4 in my application and I want to upgrade to the latest one (4.3.0) is there an easy and safe way to do that without breaking my application ? When searching I found this information from: http://angularjs.blogspot.de/2017/07/angular-43-now-available.html that link states that Angular 4.3 contains no breaking changes ? I want to do that upgrade to use HttpClient I think you should be fine. Once you reference the new packages just make sure that your ng build --prod is not breaking. If you want to use the new HttpClient you have change all parts of your code that

how to create wrapper directives for Controller in AngularJS

允我心安 提交于 2019-12-02 09:27:01
I'm trying to do upgrade controllers/components written in AngularJS1 to Angular6. I'm taking the approach of having the wrappers for all the existing AngularJS1 controllers/component by extending "UpgradeComponent" placed under the folder "directive-wrappers" in my example. We have many controllers written in AngularJS1 which need to upgraded and used inside Angular6 application. Since these controllers are bit complex we don't want to rewrite it or touch these controllers, instead we want to create some directives which would be like a wrappers for these controllers and eventually upgraded