Skip to content

Commit 0ff9682

Browse files
authored
Merge pull request #92 from pham93/angular-18-support
Angular 18 and NGXS 18 support
2 parents 55c74c8 + 55a37de commit 0ff9682

16 files changed

+11773
-19568
lines changed

README.md

+8-9
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Please use the table below to make sure you are using the correct version of thi
1414

1515
| Angular<br>version | ngxs-reset-plugin<br>version |
1616
| :----------------: | :--------------------------: |
17+
| 18+ | 4 |
1718
| 14+ | 3 |
1819
| 13 | 2 |
1920
| 12 | 2 |
@@ -66,19 +67,17 @@ npm install ngxs-reset-plugin
6667

6768
### Setup Before Initial Use
6869

69-
Import `NgxsResetPluginModule` into your root module like:
70+
Import `withNgxsResetPlugin` into your app config like:
7071

7172
```TS
72-
import { NgxsModule } from '@ngxs/store';
73-
import { NgxsResetPluginModule } from 'ngxs-reset-plugin';
73+
import { withNgxsResetPlugin } from 'ngxs-reset-plugin';
7474

75-
@NgModule({
76-
imports: [
77-
NgxsModule.forRoot([ /* Your states here */ ]),
78-
NgxsResetPluginModule.forRoot()
75+
export const appConfig: ApplicationConfig = {
76+
providers: [
77+
providerStore([]),
78+
withNgxsResetPlugin()
7979
]
80-
})
81-
export class AppModule {}
80+
}
8281
```
8382

8483
### How to Clear States

angular.json

+4-6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"test": {
2020
"builder": "@angular-devkit/build-angular:karma",
2121
"options": {
22+
"polyfills": ["zone.js", "zone.js/testing"],
2223
"main": "src/test.ts",
2324
"tsConfig": "src/tsconfig.spec.json",
2425
"karmaConfig": "src/karma.conf.js"
@@ -27,17 +28,14 @@
2728
"lint": {
2829
"builder": "@angular-eslint/builder:lint",
2930
"options": {
30-
"lintFilePatterns": [
31-
"src/**/*.ts",
32-
"src/**/*.html"
33-
]
31+
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
3432
}
3533
}
3634
}
3735
}
3836
},
39-
"defaultProject": "ngxs-reset-plugin",
4037
"cli": {
41-
"defaultCollection": "@angular-eslint/schematics"
38+
"schematicCollections": ["@angular-eslint/schematics"],
39+
"analytics": false
4240
}
4341
}

0 commit comments

Comments
 (0)