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

docs(AppShell): add guide for the App Shell Runtime Parser - #84

Open
mgechev wants to merge 1 commit into
angular:masterfrom
mgechev:app-shell-parser-guide
Open

docs(AppShell): add guide for the App Shell Runtime Parser#84
mgechev wants to merge 1 commit into
angular:masterfrom
mgechev:app-shell-parser-guide

Conversation

@mgechev

Copy link
Copy Markdown
Member

No description provided.

Comment threadguides/runtime-parser.md Outdated
import { provide } from '@angular/core';
import { APP_BASE_HREF } from '@angular/common';
import { APP_SHELL_RUNTIME_PROVIDERS } from '@angular/app-shell';
import { HelloMobileAppComponent } from './app/';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be ./app/hello-mobile.component?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a barrel generated by the CLI.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have known better 😛

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd look nicer without the trailing slash, './app'

@mgechev
mgechevforce-pushed the app-shell-parser-guide branch from ca2103d to 8967411CompareJuly 11, 2016 10:54
Comment threadguides/runtime-parser.md Outdated
context.ngShellParser.match(event.request)
.then((response: any) => {
if (response) return response;
return (<any>self).caches.match(event.request)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't you use context here (instead of <any>self)?

@mgechev
mgechevforce-pushed the app-shell-parser-guide branch from 8967411 to 2734416CompareJuly 11, 2016 13:34
Comment threadguides/runtime-parser.md Outdated
.then(() => context.ngShellParser.fetchDoc())
.then((res: any) => context.ngShellParser.parseDoc(res))
.then((strippedResponse: any) => {
return (<any>self).caches.open(SHELL_PARSER_CACHE_NAME)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self --> context (?)

@mgechev
mgechevforce-pushed the app-shell-parser-guide branch 3 times, most recently from b201161 to 4d680e2CompareJuly 11, 2016 18:31
@mgechev

Copy link
Copy Markdown
MemberAuthor

All the comments are addressed. Let me know if you find anything else.

Comment threadguides/runtime-parser.md Outdated

Now we're going to take a look at another part of the Angular Mobile Toolkit - the App Shell Runtime Parser. The Runtime Parser is a library which has the following features:

- Automatically generates the App Shell of our application by using a predefined template.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't clearly describe what the parser does. Should make clear that the shell is extrapolated from a fully dynamic prerendered page (though the words "dynamic" and "prerendered" aren't necessarily the most meaningful words to drive the point home). The sentence as it reads now sounds like it's describing the pre-renderer instead of the parser.

@mgechev
mgechevforce-pushed the app-shell-parser-guide branch from 4d680e2 to d1fcf53CompareJuly 13, 2016 07:58
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@mgechev@jeffbcross@gkalpak