You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(platform-node): create platform-node based on angular/universal #12495
Create platform-node inside this repository, to be consumed by Angular Universal and other packages that would rely on platform-node. By having it inside this repository, the package will be tested and updated alongside the core, and will be maintained by the core team.
The API should be generally compatible with the existing [platform-node](https://github.com/angular/universal/tree/master/modules/platform-node) inside the angular/universal repository so that Universal would ideally be able to just change its dependency to point at the @angular/platform-node npm package.
platform-node/node-http should be merged with http as main/browser fork.
serialize in NodePlatform shouldn't live in NodePlatform so you can mostly ignore this. Here's what's in the pipeline.
lifecycle hooks
view utils component id problems
check if the app is stable
injecting preboot
dehydrate resources
serialize document
dispose
ignore asyncPromiseSeries as rxjs is the correct way to manage the pipeline rather than promises
PlatformLocation can't live in platform due to the service having state but we need to have PlatformLocation in the platform for multiple application to use the same state.
platformNodeDynamic was created in the way it was due to limitation of core
2.1.1 broke universal due to exports privates change with compiler
NodeDomRenderer needs to be refactored to remove a lot of code dealing with converting props to attributes and ensuring that attributes are strings. The whitelist needs to be reworked to reflect attributes when setting a prop.
node-location there were problems dealing with baseUrl/requestUrl/originUrl and what is the correct way to manage them compared to the browser's way of handling them
node-document should be merged with parse5 as parse and add serialize. .head, .body, .title need to grab new references (html component fix) and title needs to correctly set a text node.
parse5-adapter has a zone.js workaround for context in it as it's impossible otherwise since there are a few methods that were not made with more than one document in mind. This sort of can be fixed by reworking some of the services but then core needs to be updated. getHistory, getCookie, etc are also impossible without our zone workaround or core change
There should be a Context service for configuration with a ZoneContext strategy to refactor the zone out the current solution. That way NodePlatform.withConfig can work again and AoT will work. The problem you will run into with constants are providers being created during platform or application before bootstrap (where dynamic config values can be used. Most dynamic configs are set at class definition time which causes a problem. For example, the URL and document are constant values that need to be dynamic per user). This problem has been a pain for location state.
Activity
PatrickJS commentedon Oct 24, 2016
notes:
platform-node/node-httpshould be merged withhttpas main/browser fork.serializein NodePlatform shouldn't live in NodePlatform so you can mostly ignore this. Here's what's in the pipeline.asyncPromiseSeriesas rxjs is the correct way to manage the pipeline rather than promises.head,.body,.titleneed to grab new references (html component fix) and title needs to correctly set a text node.There should be a Context service for configuration with a ZoneContext strategy to refactor the zone out the current solution. That way
NodePlatform.withConfigcan work again and AoT will work. The problem you will run into with constants are providers being created during platform or application before bootstrap (where dynamic config values can be used. Most dynamic configs are set at class definition time which causes a problem. For example, the URL and document are constant values that need to be dynamic per user). This problem has been a pain for location state.you can also view this old fork of commits that show how to convert a browser version to node
https://github.com/IgorMinar/new-world-test/pull/9/files
fix(deps): lock @ngtools/webpack version
PatrickJS commentedon Jan 13, 2017
close for #13822
DzmitryShylovich commentedon Feb 3, 2017
@pkozlowski-opensource ☝️ close
angular-automatic-lock-bot commentedon Sep 13, 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.