Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 18 and NGXS 18 support #92

Merged
merged 2 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Please use the table below to make sure you are using the correct version of thi

| Angular<br>version | ngxs-reset-plugin<br>version |
| :----------------: | :--------------------------: |
| 18+ | 4 |
| 14+ | 3 |
| 13 | 2 |
| 12 | 2 |
Expand Down Expand Up @@ -66,19 +67,17 @@ npm install ngxs-reset-plugin

### Setup Before Initial Use

Import `NgxsResetPluginModule` into your root module like:
Import `withNgxsResetPlugin` into your app config like:

```TS
import { NgxsModule } from '@ngxs/store';
import { NgxsResetPluginModule } from 'ngxs-reset-plugin';
import { withNgxsResetPlugin } from 'ngxs-reset-plugin';

@NgModule({
imports: [
NgxsModule.forRoot([ /* Your states here */ ]),
NgxsResetPluginModule.forRoot()
export const appConfig: ApplicationConfig = {
providers: [
providerStore([]),
withNgxsResetPlugin()
]
})
export class AppModule {}
}
```

### How to Clear States
Expand Down
10 changes: 4 additions & 6 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": ["zone.js", "zone.js/testing"],
"main": "src/test.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js"
Expand All @@ -27,17 +28,14 @@
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
}
}
}
},
"defaultProject": "ngxs-reset-plugin",
"cli": {
"defaultCollection": "@angular-eslint/schematics"
"schematicCollections": ["@angular-eslint/schematics"],
"analytics": false
}
}
Loading