Skip to content
This repository was archived by the owner on Oct 12, 2021. It is now read-only.
This repository was archived by the owner on Oct 12, 2021. It is now read-only.

feat(AppShell): make shellRender and shellNoRender directives add attributes to host #71

Open
@jeffbcross

Description

@jeffbcross

In order for the AppShell parser to properly parse a dynamic page generated by Universal (or other pre-renderer), the app shell directives *shellRender and *shellNoRender should add corresponding attributes to the host element: <el shellRender=""></el> and <el shellNoRender=""></el>.

Challenges:
Presumably, when pre-rendering on-the-fly with Universal, the isPrerender provider would be set to false, which would cause the App Shell directives to behave the same as if the page were being rendered dynamically in the browser. Therefore, any shellRender components, for example a loading indicator, would not be included in the pre-generated page (since content is already loaded into the page where the loading indicator would otherwise be). There will be an HTML comment placeholder where the component would be: <!-- template bindings={} -->, but it wouldn't contain enough information to construct the shellRender element. This could be fixed by changing isPrerender to something more progressive that could account for:

  1. building the html app shell page
  2. pre-rendering a dynamic page (server)
  3. rendering a dynamic page (browser)

Where case 2 would cause shellRender to render the loading indicator element so it could be parsed, but not displayed in the page, either by using CSS display: none or by wrapping the rendered element in HTML comments.

Maybe @mgechev is way ahead of me and has already thought of how to solve this problem :).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions