ng-upgrade

angular-phonecat upgrading from 1.x : error Failed to load template: app/phone-list/phone-list.template.html (HTTP status: 404 Not Found)

混江龙づ霸主 提交于 2019-12-08 13:24:47
问题 Hi I'm using this tutorial to lean how to migrate from Angular1 to Angular2. At the end of the step 4 Upgrading the Phone Service, when I want to check the running application with "npm start", i got this error : angular.js:13920 Error: [$compile:tpload] Failed to load template: app/phone-list/phone-list.template.html (HTTP status: 404 Not Found) 回答1: It’s just a typo error in the online tutorial. In the file app/phone-list/phone-list.component.ts change the line : templateUrl: ‘app/phone

ng upgrade command fails for upgrading cli from v7 to v8

我的梦境 提交于 2019-12-07 08:45:48
问题 The ng upgrade command for updating cli version from a v7 project to v8 fails. Manually trying to upgrade cli first also fails. ng update @angular/cli Your global Angular CLI version (8.0.1) is greater than your local version (7.3.9). The local Angular CLI version is used. Package "@angular/compiler-cli" has an incompatible peer dependency to " typescript " (requires ">=3.1.1 <3.3", would install "3.4.5") . Incompatible peer dependencies found. See above. 回答1: try upgrading all packages using

Using protractor with ng-upgrade

浪尽此生 提交于 2019-12-07 07:03:10
问题 I am working on migrating my AngularJS (1.6) app to Angular (4) and now have a hybrid application, bootstrapped with NgUpgrade. However, this seems to have completely broken my Protractor tests. Failed: Timed out waiting for asynchronous Angular tasks to finish after 11 seconds. This may be because the current page is not an Angular application. Please see the FAQ for more details: https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular While waiting for element

ng upgrade command fails for upgrading cli from v7 to v8

浪尽此生 提交于 2019-12-05 18:08:13
The ng upgrade command for updating cli version from a v7 project to v8 fails. Manually trying to upgrade cli first also fails. ng update @angular/cli Your global Angular CLI version (8.0.1) is greater than your local version (7.3.9). The local Angular CLI version is used. Package "@angular/compiler-cli" has an incompatible peer dependency to " typescript " (requires ">=3.1.1 <3.3", would install "3.4.5") . Incompatible peer dependencies found. See above. try upgrading all packages using ng update --all --force if this doesn't work then try upgrading core and CLI ng update @angular/core

Using downgradeModule in conjunction with downgradeInjectable in an angular / angularjs hybrid application results in error

感情迁移 提交于 2019-12-03 02:35:51
With angular 5.0 the upgrade module now has the option of using downgradeModule which runs angularjs outside of the angular zone. While experimenting with this I have run into a problem with using downgradeInjectable. I am receiving the error: Uncaught Error: Trying to get the Angular injector before bootstrapping an Angular module. Bootstrapping angular in angular js works fine import 'zone.js/dist/zone.js'; import * as angular from 'angular'; /** * Angular bootstrapping */ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { decorateModuleRef } from 'src

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

Angular 2+ can't find Angular 1.X to bootstrap

╄→尐↘猪︶ㄣ 提交于 2019-11-28 10:35:26
I'm trying to bootstrap an Angular 1.X app with Angular 2+ (Angular 4.1.0 at the time of writing this question). I followed the online guide to the T but can't seem to make headway. I'm using a hybrid of ES2015+ (compiled via Babel) and TypeScript. Everything compiles correctly and I can run both Angular 1 and Angular 2 separately successfully. They get compiled together using Webpack if that makes a difference. Here's what my Angular 1.X entry file ( app.ts ) approximately looks like: import * as angular from 'angular'; export default angular.module('app', []) .run(function() { console.log(

Angular 2+ can't find Angular 1.X to bootstrap

谁都会走 提交于 2019-11-27 03:41:46
问题 I'm trying to bootstrap an Angular 1.X app with Angular 2+ (Angular 4.1.0 at the time of writing this question). I followed the online guide to the T but can't seem to make headway. I'm using a hybrid of ES2015+ (compiled via Babel) and TypeScript. Everything compiles correctly and I can run both Angular 1 and Angular 2 separately successfully. They get compiled together using Webpack if that makes a difference. Here's what my Angular 1.X entry file ( app.ts ) approximately looks like: import

Migrating AngularJS to Angular 4,5 (with DEMO) [closed]

你说的曾经没有我的故事 提交于 2019-11-26 08:49:22
I am looking into ways of migration a current Angular 1 project to Angular 4. Options are ng-forward , ngUpgrade or rewrite . I am thinking on rewriting it but with a twist. I keep the current application Start writing the new one parallel to it All new NG4 rewrites, I want to use ... so bit by bit in other words. Has anyone attempted this or know a better way? Incrementally upgrade an AngularJS application to Angular. One of the keys to a successful upgrade is to do it incrementally, by running the two frameworks side by side in the same application , and porting AngularJS components to

Migrating AngularJS to Angular 4,5 (with DEMO) [closed]

别等时光非礼了梦想. 提交于 2019-11-26 02:02:22
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago . I am looking into ways of migration a current Angular 1 project to Angular 4. Options are ng-forward , ngUpgrade or rewrite . I am thinking on rewriting it but with a twist. I keep the current application Start writing the new one parallel to it All new NG4 rewrites, I want