angular4

what are the differences between angular2 and angular4 [duplicate]

假装没事ソ 提交于 2019-11-30 04:15:52
This question already has an answer here: What is Angular 4 and from where I can learn more about it? 7 answers can you please let me know the differences between angular2 and angular4. We know that there is a drastic change between angular1 and angular2. Is it repeated again for angular4. There is nothing path breaking between angular 2 and angular 4 like angular 1 and angular 2. They are just doing it to maintain SEMVER(Sementic Versioning). Angular 2 is stable now so it would be better to prefer angular 2 instead of angular 4. Angular 2 was a complete rewrite of AngularJS 1.x with many new

SyntaxError: Unexpected token 'const' for testing.es5.js

时光怂恿深爱的人放手 提交于 2019-11-29 16:50:55
I've switched to Angular4.0.0-rc.1 and it looks like ES5 testing bundles contain ES2015 code. I'm getting this error: PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR SyntaxError: Unexpected token 'const' at webpack:///~/@angular/core/@angular/core/testing.es5.js:10:0 <- src/test.ts:16345 Also found related issue on Angular repo. I just created a basic Angular project and had the same (or similar) issue with PhantomJS integration. PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR SyntaxError: Unexpected token 'const' at webpack:///src/app/app.component.ts:1:0 <- src/test.ts:63184 Our team got it to work and here's

Angular 4.0.0 App built by angular-cli 1.0.0 not working in IE11

雨燕双飞 提交于 2019-11-29 05:17:48
问题 I try to run my virgin Angular 4 Application built by the angular-cli 1.0.0 in the Internet Explorer 11, but I have no success and I get the following error: Error: The "apply" property of an undefined or null reference can not be retrieved. I have no additional library installed, it is just a new generated project. In Google Chrome it is working perfectly. My package.json: { "name": "angi4testie", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve", "build":

Is it worth to migrate from Angular 2 to Angular 4?

允我心安 提交于 2019-11-28 17:15:23
Hello SO community and Angularians! So, I am midway developing a huge platform in Angular 2. And I realized that many external libraries and dependencies for Angular 2 are migrating to the new Angular 4. Giving me many errors, obviously. I could fork these libraries and use the forked versions and subscribe to main library development or, I could just upgrade to Angular 4 my project. Questions to be answered in order to determinate if it's worth for me to migrate: Compatibility with Angular 2.4 I have found some adaptations to ensure compatibility with legacy, like this: https://github.com

Angular4 What definition of Iterable should I use

ε祈祈猫儿з 提交于 2019-11-28 14:28:41
I have upgraded my app to the latest Angular 4 (beta-8) version. However I keep having the following error : @angular\core\src\change_detection\differs\iterable_differs.d.ts:14: TS2304 Cannot find name 'Iterable' I did look up the changelog and found : A definition of Iterable<T> is now required to correctly compile Angular applications. Support for Iterable<T> is not required at runtime but a type definition Iterable<T> must be available. What should I use as Iterable definition here ? EDIT: tsconfig.json "compilerOptions": { "target": "es5", "module": "commonjs", "moduleResolution": "node",

Type 'void' is not assignable to type 'ObservableInput<{}>'

☆樱花仙子☆ 提交于 2019-11-27 20:00:04
This error started to pop up after I migrated to TS 2.2.2, so I'm assuming that's the problem... The code did not stop working, but now I receive that error and I tried a few things like returning an empty observable, catching the re-thrown exception and returning an object, nothing seemed to work. Why is this happening now? Shouldn't it understand I'm re-throwing the exception and not expect a return? Am I misreading the error? This is the complete error description: Here's the complete code: return request .map((res: Response) => res.json()) .catch((error: any) => { // todo: log? if (error

Is it worth to migrate from Angular 2 to Angular 4?

对着背影说爱祢 提交于 2019-11-27 10:20:14
问题 Hello SO community and Angularians! So, I am midway developing a huge platform in Angular 2. And I realized that many external libraries and dependencies for Angular 2 are migrating to the new Angular 4. Giving me many errors, obviously. I could fork these libraries and use the forked versions and subscribe to main library development or, I could just upgrade to Angular 4 my project. Questions to be answered in order to determinate if it's worth for me to migrate: Compatibility with Angular 2

Angular2: Use Pipe to render templates dynamically

£可爱£侵袭症+ 提交于 2019-11-27 09:35:34
I am creating a form where I get the fields from the backend. After mapping, I have something like this: genericFilters: { iboId: { 'display': false, 'template': '' }, iboCode: { 'display': true, 'template': 'text_input_iboCode', /*'template': 'text/iboCode'*/ }, iboName: { 'display': true, 'template': 'text_input_iboName' }, iboSurname: { 'display': true, 'template': 'text_input_iboSurname' }, iboRank: { 'display': false, 'template': 'multiselect_iboRank', /*'template': 'select/multi_iboRank',*/ }, iboEmail: { 'display': false, 'template': 'text_input_iboEmail' }, iboNewsletter: { 'display':

Angular4 What definition of Iterable should I use

拈花ヽ惹草 提交于 2019-11-27 08:35:51
问题 I have upgraded my app to the latest Angular 4 (beta-8) version. However I keep having the following error : @angular\core\src\change_detection\differs\iterable_differs.d.ts:14: TS2304 Cannot find name 'Iterable' I did look up the changelog and found : A definition of Iterable<T> is now required to correctly compile Angular applications. Support for Iterable<T> is not required at runtime but a type definition Iterable<T> must be available. What should I use as Iterable definition here ? EDIT:

Type 'void' is not assignable to type 'ObservableInput<{}>'

烈酒焚心 提交于 2019-11-26 19:59:14
问题 This error started to pop up after I migrated to TS 2.2.2, so I'm assuming that's the problem... The code did not stop working, but now I receive that error and I tried a few things like returning an empty observable, catching the re-thrown exception and returning an object, nothing seemed to work. Why is this happening now? Shouldn't it understand I'm re-throwing the exception and not expect a return? Am I misreading the error? This is the complete error description: Here's the complete code