Compare commits

...

2 Commits

Author SHA1 Message Date
胡锐 b2cde8ec86 angular16 2 days ago
胡锐 2bf0f0f5c3 angular15 2 days ago
  1. 7695
      package-lock.json
  2. 28
      package.json
  3. 4
      src/app/services/init-guard.service.ts
  4. 11
      src/test.ts
  5. 5
      tsconfig.json

7695
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -11,14 +11,14 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^14.3.0",
"@angular/common": "^14.3.0",
"@angular/compiler": "^14.3.0",
"@angular/core": "^14.3.0",
"@angular/forms": "^14.3.0",
"@angular/platform-browser": "^14.3.0",
"@angular/platform-browser-dynamic": "^14.3.0",
"@angular/router": "^14.3.0",
"@angular/animations": "^16.2.12",
"@angular/common": "^16.2.12",
"@angular/compiler": "^16.2.12",
"@angular/core": "^16.2.12",
"@angular/forms": "^16.2.12",
"@angular/platform-browser": "^16.2.12",
"@angular/platform-browser-dynamic": "^16.2.12",
"@angular/router": "^16.2.12",
"@notadd/ngx-neditor": "^1.0.2",
"@types/jquery": "^3.5.0",
"echarts": "^4.9.0",
@ -27,13 +27,13 @@
"ngx-echarts": "^4.2.2",
"rxjs": "~6.5.4",
"tslib": "^2.0.0",
"zone.js": "~0.11.4"
"zone.js": "~0.13.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.2.13",
"@angular/cli": "^14.2.13",
"@angular/compiler-cli": "^14.3.0",
"@angular/language-service": "^14.3.0",
"@angular-devkit/build-angular": "^16.2.16",
"@angular/cli": "^16.2.16",
"@angular/compiler-cli": "^16.2.12",
"@angular/language-service": "^16.2.12",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
@ -49,6 +49,6 @@
"ts-md5": "^1.2.7",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.6.4"
"typescript": "~4.9.5"
}
}

@ -1,11 +1,11 @@
import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from '@angular/router';
import {LocalStorageService} from './local-storage.service';
import {INIT_FLAG, ROLE_TYPE} from './local-storage.namespace';
@Injectable()
export class InitGuardService implements CanActivate {
export class InitGuardService {
constructor(
private storage: LocalStorageService,
private router: Router,

@ -7,13 +7,6 @@ import {
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
@ -21,7 +14,3 @@ getTestBed().initTestEnvironment(
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

@ -10,7 +10,7 @@
"module": "es2020",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2020",
"target": "ES2022",
"typeRoots": [
"node_modules/@types"
],
@ -18,7 +18,8 @@
"es2018",
"dom"
],
"allowSyntheticDefaultImports": true
"allowSyntheticDefaultImports": true,
"useDefineForClassFields": false
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,

Loading…
Cancel
Save