Skip to content

Commit

Permalink
docs: ✏️ update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
shaharkazaz committed Apr 29, 2024
1 parent 77ef6c3 commit 585e50f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,15 @@ Now run `npm start` and it'll generate new keys whenever a **save** is made to t
The extractor supports [scopes](https://jsverse.github.io/transloco/docs/scope-configuration/) out of the box. When you define a new scope in the `providers` array:
```ts
import { TRANSLOCO_SCOPE } from '@jsverse/transloco';
import { TRANSLOCO_SCOPE, provideTranslocoScope } from '@jsverse/transloco';

@Component({
templateUrl: './admin-page.component.html',
providers: [{ provide: TRANSLOCO_SCOPE, useValue: 'admin' }]
providers: [
{ provide: TRANSLOCO_SCOPE, useValue: 'admin' },
provideTranslocoScope('todo'),
provideTranslocoScope(['another', {scope: 'reallyLong', alias: 'rl'}]),
]
})
export class AdminPageComponent {}
```
Expand Down

0 comments on commit 585e50f

Please sign in to comment.