Skip to content
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 from
Closed

Conversation

@MarkPieszak
Copy link
Member

@MarkPieszak MarkPieszak commented Oct 23, 2016

Fixes #606

SelectorMatcher & CssSelector made public.

ViewUtils changed to view_utils

Backwards compatibility

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.

@PatrickJS

PatrickJS Oct 24, 2016
Member

this also needs to be backwards compatible

MarkPieszak added 2 commits Oct 24, 2016
@John0x
Copy link

@John0x John0x commented Oct 26, 2016

Anything new regarding this issue?

@MarkPieszak
Copy link
Member Author

@MarkPieszak MarkPieszak commented Oct 26, 2016

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

@qibucloud
Copy link

@qibucloud 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 fix(platform-node): update private imports and make backwards compatible fix(platform-node): 2.1.1 fix - update private imports and make backwards compatible Oct 27, 2016
@MarkPieszak MarkPieszak mentioned this pull request Oct 27, 2016
2 of 2 tasks complete
@SamD
Copy link

@SamD SamD commented Nov 10, 2016

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

@MarkPieszak
Copy link
Member Author

@MarkPieszak 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
Copy link

@julienR2 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
Copy link

@larsbeck 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
Copy link
Member Author

@MarkPieszak 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
Copy link

@larsbeck larsbeck commented Nov 17, 2016

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

@PatrickJS
Copy link
Member

@PatrickJS PatrickJS 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
Copy link

@Reuvenc 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).

@PatrickJS
Copy link
Member

@PatrickJS PatrickJS commented Jan 8, 2017

will be fixed in ng4
angular/angular#13822

@sohaibjaved44
Copy link

@sohaibjaved44 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
Copy link
Member Author

@MarkPieszak MarkPieszak commented Feb 8, 2017

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

@daveriedstra
Copy link

@daveriedstra 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.

@angular-automatic-lock-bot
Copy link

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Sep 5, 2019

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

10 participants