Skip to content

Commit

Permalink
Merge pull request #92 from pham93/angular-18-support
Browse files Browse the repository at this point in the history
Angular 18  and NGXS 18 support
  • Loading branch information
mehmet-erim authored Jun 23, 2024
2 parents 55c74c8 + 55a37de commit 0ff9682
Show file tree
Hide file tree
Showing 16 changed files with 11,773 additions and 19,568 deletions.
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

0 comments on commit 0ff9682

Please sign in to comment.