-
Notifications
You must be signed in to change notification settings - Fork 175
docs(AppShell): add guide for the App Shell Runtime Parser #84
base: master
Are you sure you want to change the base?
Conversation
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/'; |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 😛
There was a problem hiding this comment.
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'
ca2103d
to
8967411
Compare
context.ngShellParser.match(event.request) | ||
.then((response: any) => { | ||
if (response) return response; | ||
return (<any>self).caches.match(event.request) |
There was a problem hiding this comment.
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
)?
8967411
to
2734416
Compare
.then(() => context.ngShellParser.fetchDoc()) | ||
.then((res: any) => context.ngShellParser.parseDoc(res)) | ||
.then((strippedResponse: any) => { | ||
return (<any>self).caches.open(SHELL_PARSER_CACHE_NAME) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self --> context (?)
b201161
to
4d680e2
Compare
All the comments are addressed. Let me know if you find anything else. |
|
||
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. |
There was a problem hiding this comment.
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.
4d680e2
to
d1fcf53
Compare
No description provided.