Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Add a 'Usage' section
  • Loading branch information
davidmorissette authored May 2, 2021
1 parent 94d5357 commit 7cfd027
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,33 @@ be executed on specific states.
- 😎 Checkout the [sample application](./integration)
- 📝 Learn about updates from the [changelog](CHANGELOG.md)

### Usage

Call the <code>InterceptorStrategy.configure</code> fluent method from within the <code>NgxsStoragePluginModule</code>
configuration.

```ts
import { InterceptorStrategy } from '@ngxs-labs/storage-plugin-extension';

const strategy: InterceptorStrategy = new InterceptorStrategy([
// Define your strategies here
]);

@NgModule({
// ...
imports: [
NgxsStoragePluginModule.forRoot(
strategy.configure({
// NgxsStoragePluginOptions
})
)
],
// ...
})
export class AppModule {}

```

### Delivery example

In this example we use the <code>InterceptorStrategy</code> class to configure
Expand Down Expand Up @@ -157,6 +184,8 @@ export const strategy: InterceptorStrategy = new InterceptorStrategy([
`app.module.ts`

```ts
import { strategy } from './configuration';

@NgModule({
declarations: [AppComponent],
imports: [
Expand Down

0 comments on commit 7cfd027

Please sign in to comment.