New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(platform-node): 2.1.1 fix - update private imports and make backwards compatible #607

Closed
wants to merge 7 commits into
base: master
from

Conversation

Projects
None yet
10 participants
@MarkPieszak
Member

MarkPieszak commented Oct 23, 2016

Fixes #606

SelectorMatcher & CssSelector made public.

ViewUtils changed to view_utils

Backwards compatibility

fix(platform-node): update private imports and make backwards compatible
Fixes #606

SelectorMatcher & CssSelector made public.

ViewUtils changed to view_utils

Backwards compatibility
@@ -16,18 +18,24 @@ const {
} = __platform_browser_private__;
const {
ViewUtils,
view_utils,

This comment has been minimized.

@gdi2290

gdi2290 Oct 24, 2016

Member

this also needs to be backwards compatible

MarkPieszak added some commits Oct 24, 2016

@John0x

This comment has been minimized.

John0x commented Oct 26, 2016

Anything new regarding this issue?

@MarkPieszak

This comment has been minimized.

Member

MarkPieszak commented Oct 26, 2016

@gdi2290 want me to refactor this more in your way?

@qibucloud

This comment has been minimized.

qibucloud commented Oct 27, 2016

Angular2 在 asp.net core 里面只能这样使用? 不能官方原生态使用?

Angular2 in asp.net core which can only be used? Can not the official use of the original ecology?

@MarkPieszak MarkPieszak changed the title from fix(platform-node): update private imports and make backwards compatible to fix(platform-node): 2.1.1 fix - update private imports and make backwards compatible Oct 27, 2016

@MarkPieszak MarkPieszak referenced this pull request Oct 27, 2016

Closed

Updating to Angular 2.1.1 crashes Universal #603

2 of 2 tasks complete
@SamD

This comment has been minimized.

SamD commented Nov 10, 2016

Any update, not seeing the fix applied. The latest npm version is 2.1.0-rc.1

@MarkPieszak

This comment has been minimized.

Member

MarkPieszak commented Nov 14, 2016

@SamD @julienR2 I believe we need to wait for Core to make these changes, but in the meantime if you want to use 2.1.1+ you can use the __2.1.1.workaround.ts file: https://github.com/MarkPieszak/aspnetcore-angular2-universal/tree/master/Client here, and then include it in both the client & server bootstrap files. That can at least hold you off for now!

@julienR2

This comment has been minimized.

julienR2 commented Nov 14, 2016

Thanks a lot for the workaround ! I missed it during my investigations.. Not in a hurry for 2.1.1+ so far, but I keep it close in case I need a feature from this version until Core changes :)

@larsbeck

This comment has been minimized.

larsbeck commented Nov 17, 2016

@MarkPieszak I tried this workaround with 2.2.0, but it doesn't seem to do the trick. Should it work with 2.2.0 as well?

@MarkPieszak

This comment has been minimized.

Member

MarkPieszak commented Nov 17, 2016

@larsbeck use the workaround fix here (https://github.com/MarkPieszak/aspnetcore-angular2-universal/tree/master/Client) take the workaround file put it in your project and import it to the top of your client & server main files.

import './__2.1.1.workaround.ts'; // temporary until 2.1.1 things are patched in Core

@larsbeck

This comment has been minimized.

larsbeck commented Nov 17, 2016

@MarkPieszak Ah yes, moving them to the very top fixed it. Thanks!

@gdi2290

This comment has been minimized.

Member

gdi2290 commented Nov 28, 2016

this gets really tricky to support semver. It's best just to follow the angular releases for at least the major and minor releases while the patches we can release out of sync

@Reuvenc

This comment has been minimized.

Reuvenc commented Jan 1, 2017

Is there anything new regarding this PR?
I'm trying to integrate AOT for universal, but although using the workarounds provided in universal-starter repo, I'm still getting SelectorMetcher errors (SelectorMatcher of undefined).

@gdi2290

This comment has been minimized.

Member

gdi2290 commented Jan 8, 2017

will be fixed in ng4
angular/angular#13822

@sohaibjaved44

This comment has been minimized.

sohaibjaved44 commented Feb 8, 2017

People who are planning to import "import './__2.1.1.workaround.ts'; " need to take care of the order as well.
Some people have mentioned that it is supposed to be placed after pollyfills but in my case it was happy at 3rd place after polyfills and @angular/core... Hope it help someone.
import 'angular2-universal-polyfills/browser';
import { enableProdMode } from '@angular/core';
import './__2.1.1.workaround.ts';

@MarkPieszak

This comment has been minimized.

Member

MarkPieszak commented Feb 8, 2017

Yes @sohaibjaved44 typically you want it below the universal polyfills, otherwise some bizarre errors pop up.

@daveriedstra

This comment has been minimized.

daveriedstra commented Feb 25, 2017

@MarkPieszak and @sohaibjaved44 thank you! This fixed something that's been confusing me for hours. I think I was confused because of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment