diff options
author | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-01 20:21:29 +0000 |
---|---|---|
committer | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-01 20:21:29 +0000 |
commit | 61cb1570a3410c85a4489b97c172e3a50715f36c (patch) | |
tree | 8fe4a5b77ea54bba80abc817ce2c9ef0e79e7e66 /sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/index.js | |
parent | 21a53d349788c99d2007cba91a923db982353b31 (diff) | |
parent | a9ee9e0a500a4a15bd0b5dcaf041f827228ed309 (diff) |
Merge branch 'researchML' into 'dev'
Research ml
See merge request igrannonica/neuronstellar!6
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/index.js')
-rw-r--r-- | sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/index.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/index.js b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/index.js new file mode 100644 index 00000000..bfec75da --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/index.js @@ -0,0 +1,38 @@ +"use strict"; +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +Object.defineProperty(exports, "__esModule", { value: true }); +const schematics_1 = require("@angular-devkit/schematics"); +const generate_from_files_1 = require("../utility/generate-from-files"); +const schema_1 = require("./schema"); +function default_1(options) { + if (!options.implements) { + throw new schematics_1.SchematicsException('Option "implements" is required.'); + } + const implementations = options.implements + .map((implement) => (implement === 'CanDeactivate' ? 'CanDeactivate<unknown>' : implement)) + .join(', '); + const commonRouterNameImports = ['ActivatedRouteSnapshot', 'RouterStateSnapshot']; + const routerNamedImports = [...options.implements, 'UrlTree']; + if (options.implements.includes(schema_1.Implement.CanLoad)) { + routerNamedImports.push('Route', 'UrlSegment'); + if (options.implements.length > 1) { + routerNamedImports.push(...commonRouterNameImports); + } + } + else { + routerNamedImports.push(...commonRouterNameImports); + } + routerNamedImports.sort(); + const implementationImports = routerNamedImports.join(', '); + return (0, generate_from_files_1.generateFromFiles)(options, { + implementations, + implementationImports, + }); +} +exports.default = default_1; |