-
Notifications
You must be signed in to change notification settings - Fork 683
Parse5DomAdapter has no implementation for getCookie #167
Comments
From angular/universal#536 (comment) That should fix it for you! We might need to make sure we document that somewhere. |
I've got the same issue. Putting the UniversalModule as the last import in my main.node.ts solves the problem, but then a couple of my styles (e.g. bootstrap, font-awesome etc.) aren't rendered directly from the server. Anybody with the same problem? |
@crebuh Were you importing things like HttpModule BrowserModule and such in your imports by any chance? Can you copy paste what you had, curious why that was happening. Thanks |
the import part of my main.node.ts looks like this:
when I put the UniversalModule at the last position, the parse error is gone, but the styles are not loaded from the server. They were only loaded when the client kicks in.
|
Is your root App the entire |
No I used the same structure the universal-starter project is using. My root component is ... I took a closer look at the error message and it seems the problem is related to the ng2-translate lib, which I'm using in the project.
|
@gdi2290 does this mean that ng2-translate should be doing DI swapping for diff implementation on client and server? If so, this points out the need for us having a universal cookie service so we can abstract how we get access to request level stuff on the server side. |
@jeffwhelpley we can support |
The Zone proxy is a temporary workaround for this. It is a bad idea to try and have anyone using this as a standard. The goal should be to have it as an injectable service. |
I am getting this when I access a deep link i.e. http://site/item/1 but if I visit the root (http://site/) then click a link which leads to /item/1 it works perfectly. |
Any updates on this, moving the module load order doesn't do the trick. |
@gdi2290 We could add this one into that parse5 PR (if we finally get it fixed up) We implemented getLocation and a bunch of other things but not cookies yet. |
Can someone explain why UniversalModule must be loaded last? It removed the error but it seems slower. |
I am using asp template and in my app module there is comment that UniversalModule must be imported first: Can someone explain should it be first or last and what does it mean ? |
the error is due to a 3rd party module including HttpModule while UniversalModule includes a Node version of HttpModule. I mentioned this to the angular team along with 2 solutions to make this seamless for users in the next release. |
Hello @gdi2290 excuse my English I'm building an app that uses ng2-translate and UniversalModule. How can I fix the problem ? If I change UniversalModule by BrowserModule and HttpModule I get another error: |
Try loading the UniversalModule last.
Make sure that your app.component is being loaded.
…On Mon, Feb 6, 2017 at 8:53 AM, cristiancamiloperezlopez < ***@***.***> wrote:
Hello @gdi2290 <https://github.com/gdi2290> excuse my English
I'm building an app that uses ng2-translate and UniversalModule.
I still get the error: This method is not implemented in Parse5DomAdapter:
getCookie
I suppose it's because TranslateModule uses Http from "@ angular / http"
How can I fix the problem ?
If I change UniversalModule by BrowserModule and HttpModule I get another
error:
The selector "app" did not match any elements
:(
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#167 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA4SKBgCxWpuvx8ZSmhPdFmZ4sSDzAVAks5rZzP6gaJpZM4J_l_J>
.
|
Hi @DoubleExposure , thanks for the help I already tried, but I get another error :( "An unhandled exception occurred while processing the request. I guess it's reading the resource files (i18n/es.json) In my app.module @NgModule ({ UniversalModule, I see AppComponent is loading. If UniversalModule is in the first place and I delete import TranslateModule.forRoot ... Everything works perfectly Thanks for the help :( |
Hi,
i make an http.get request, and get following error on the server
EXCEPTION: This method is not implemented in Parse5DomAdapter: Parse5DomAdapter#getCookie
ORIGINAL STACKTRACE:
Error: This method is not implemented in Parse5DomAdapter: Parse5DomAdapter#getCookie
at _notImplemented (/home/khan/code/stroika/node_modules/angular2-platform-node/parse5-adapter.js:22:12)
at Parse5DomAdapter.getCookie (/home/khan/code/stroika/node_modules/angular2-platform-node/parse5-adapter.js:625:15)
at CookieXSRFStrategy.configureRequest (/home/khan/code/stroika/node_modules/@angular/http/bundles/http.umd.js:1597:92)
at XHRBackend.createConnection (/home/khan/code/stroika/node_modules/@angular/http/bundles/http.umd.js:1637:32)
at httpRequest (/home/khan/code/stroika/node_modules/@angular/http/bundles/http.umd.js:1975:24)
at Http.get (/home/khan/code/stroika/node_modules/@angular/http/bundles/http.umd.js:2086:20)
at AppService.getCore (/home/khan/code/stroika/dist/server/index.js:535:19)
at AppService.getInitState (/home/khan/code/stroika/dist/server/index.js:438:14)
at AppComponent.ngOnInit (/home/khan/code/stroika/dist/server/index.js:4257:22)
at AppView._View_AppComponent_Host0.detectChangesInternal (AppComponent_Host.ngfactory.js:30:81)
how can i solve this issue ?
The text was updated successfully, but these errors were encountered: