angular2-upgrade

Upgrade Angular version (now: 2.4.3 or 4.0.0-beta.3) following the best practice?

痞子三分冷 提交于 2019-12-20 12:28:26
问题 Now that Angular is following a Semantic Versioning, and Angular2.4.3 were released, I'm a little confused here on what is the best practice when I upgrade to the next Angular version in existing project. I've a project with Angular-cli, with @angular/core: 2.2.0 . Here is my package.json : "dependencies": { "@angular/common": "~2.2.0", "@angular/compiler": "~2.2.0", "@angular/core": "~2.2.0", "@angular/forms": "~2.2.0", "@angular/http": "~2.2.0", "@angular/platform-browser": "~2.2.0", "

NgModule is not a function

浪子不回头ぞ 提交于 2019-12-13 07:16:02
问题 As of last Friday 19 Aug 2016 I started getting a runtime javascript console error: Error: TypeError: s.NgModule is not a function(…) in my RC4-based application. I have not tried to update to RC5 yet so I would expect my RC4-based code to still work per the documentation. My package.json is (a bit anonymized): { "name": "xxxxxxxxxx", "version": "2.0.0", "description": "xxxxxxxxxxxxxxxxxyyyyyyyyy", "scripts": { "start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ", "lite": "node

Upgrading from Angular 2.0.0 to 2.4.0 - Cannot read property SelectorMatcher

寵の児 提交于 2019-12-11 04:36:54
问题 I am working on this demo project. It is created from this tutorial. It is based on Angular 2.0.0. I want to upgrade the project to Angular 2.4. What I have done is this- New package.json- { "author": "Abrar Jahin", "dependencies": { "@angular/common": "^2.4.1", "@angular/compiler": "^2.4.1", "@angular/core": "^2.4.1", "@angular/forms": "^2.4.1", "@angular/http": "^2.4.1", "@angular/platform-browser": "^2.4.1", "@angular/platform-browser-dynamic": "^2.4.1", "@angular/platform-server": "^2.4.1

Angular2 RC5 error:zone.js: Unhandled Promise rejection: No provider for ElementRef

泄露秘密 提交于 2019-12-07 03:58:35
问题 I recently upgrade from RC4 to RC5, and didn't change any code, but the app is broken. Here is the error message: The error message seems came out when load the index.html file: <html> <head> <script> var pjson = require('./package.json'); document.title = pjson.name; </script> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="./node_modules/font-awesome/css/font-awesome.min.css"> <link rel="stylesheet" href="./node_modules/bootstrap/dist/css

Angular2 RC5 error:zone.js: Unhandled Promise rejection: No provider for ElementRef

送分小仙女□ 提交于 2019-12-05 08:03:12
I recently upgrade from RC4 to RC5, and didn't change any code, but the app is broken. Here is the error message: The error message seems came out when load the index.html file: <html> <head> <script> var pjson = require('./package.json'); document.title = pjson.name; </script> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="./node_modules/font-awesome/css/font-awesome.min.css"> <link rel="stylesheet" href="./node_modules/bootstrap/dist/css/bootstrap.min.css"> <link rel="stylesheet" href="./css/global.css"> <!-- 1. Load libraries --> <!--

Angular2 upgrade to RC6, traceur not found

心不动则不痛 提交于 2019-12-04 20:39:48
问题 After upgrade to RC6 , following errors occurs: zone.js:101 GET http://localhost/traceur 404 (Not Found) zone.js:484 Unhandled Promise rejection: Error: XHR error (404 Not Found) loading http://localhost/traceur at XMLHttpRequest.wrapFn [as _onreadystatechange] (http://localhost/vendor/zone.js/dist/zone.js:794:30) at ZoneDelegate.invokeTask (http://localhost/vendor/zone.js/dist/zone.js:365:38) at Zone.runTask (http://localhost/vendor/zone.js/dist/zone.js:265:48) at XMLHttpRequest.ZoneTask

Angular2 RC6 upgrade

假装没事ソ 提交于 2019-12-01 01:40:16
问题 after updating my project to RC6 following errors occurs: Error: Typescript found the following errors: app.component.ts (12, 3): Argument of type '{ moduleId: string; selector: string; templateUrl: string; styleUrls: string[]; directives: (type...' is not assignable to parameter of type 'ComponentMetadataType'. Object literal may only specify known properties, and 'directives' does not exist in type 'ComponentMetadataType'. app.component.ts import {Component, OnInit} from '@angular/core';