Skip to content

Commit e53a374

Browse files
JeanMechepkozlowski-opensource
authored andcommitted
docs: format RouterUpgradeInitializer usage notes (angular#60930)
This commit also adds a standalone example PR Close angular#60930
1 parent f88c747 commit e53a374

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/router/upgrade/src/upgrade.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ import {UpgradeModule} from '@angular/upgrade/static';
1717
*
1818
* @usageNotes
1919
*
20-
* <code-example language="typescript">
20+
* For standalone applications:
21+
* ```ts
22+
* export const appConfig: ApplicationConfig = {
23+
* providers: [RouterUpgradeInitializer],
24+
* };
25+
* ```
26+
*
27+
* For NgModule based applications:
28+
* ```ts
2129
* @NgModule({
2230
* imports: [
2331
* RouterModule.forRoot(SOME_ROUTES),
@@ -30,7 +38,7 @@ import {UpgradeModule} from '@angular/upgrade/static';
3038
* export class AppModule {
3139
* ngDoBootstrap() {}
3240
* }
33-
* </code-example>
41+
* ```
3442
*
3543
* @publicApi
3644
*/

0 commit comments

Comments
 (0)