chore: update cheatsheet for new provider syntax (#9227)
This commit is contained in:

committed by
Naomi Black

parent
27024915e4
commit
54c577cfe0
@ -8,11 +8,11 @@ Bootstrapping
|
||||
|
||||
@cheatsheetItem
|
||||
syntax(ts dart):
|
||||
`bootstrap(MyAppComponent, [MyService, provide(...)]);`|`provide`
|
||||
`bootstrap(MyAppComponent, [MyService, { provide: ... }]);`|`provide`
|
||||
syntax(js):
|
||||
`document.addEventListener('DOMContentLoaded', function () {
|
||||
ng.platform.browser.bootstrap(MyAppComponent,
|
||||
[MyService, ng.core.provide(...)]);
|
||||
[MyService, { provide: ... }]);
|
||||
});`|`provide`
|
||||
description:
|
||||
Bootstraps an application with MyAppComponent as the root component and configures the DI providers. {@target js}Must be wrapped in the event listener to fire when the page loads.{@endtarget}
|
||||
|
Reference in New Issue
Block a user