aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/files
diff options
context:
space:
mode:
authorDanijel Andjelkovic <adanijel99@gmail.com>2022-03-01 21:54:41 +0100
committerDanijel Andjelkovic <adanijel99@gmail.com>2022-03-01 21:54:41 +0100
commit6c8128f9fd5a5d0be115806c35a21b3d683df8d6 (patch)
treef46c2f6b3b9b294ff32bd75c08ccdc9e7a8cc4ef /sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/files
parent2400b84e95913665da6279114168148444b8f9ab (diff)
parent7d3640f824f46490b47bd95f1c5a16644f712068 (diff)
Merge branch 'dev' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into logo
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/files')
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/files/__name@dasherize__.guard.spec.ts.template16
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/files/__name@dasherize__.guard.ts.template31
2 files changed, 47 insertions, 0 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/files/__name@dasherize__.guard.spec.ts.template b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/files/__name@dasherize__.guard.spec.ts.template
new file mode 100644
index 00000000..0ce1ff44
--- /dev/null
+++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/files/__name@dasherize__.guard.spec.ts.template
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { <%= classify(name) %>Guard } from './<%= dasherize(name) %>.guard';
+
+describe('<%= classify(name) %>Guard', () => {
+ let guard: <%= classify(name) %>Guard;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({});
+ guard = TestBed.inject(<%= classify(name) %>Guard);
+ });
+
+ it('should be created', () => {
+ expect(guard).toBeTruthy();
+ });
+});
diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/files/__name@dasherize__.guard.ts.template b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/files/__name@dasherize__.guard.ts.template
new file mode 100644
index 00000000..3dc36a01
--- /dev/null
+++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/files/__name@dasherize__.guard.ts.template
@@ -0,0 +1,31 @@
+import { Injectable } from '@angular/core';
+import { <%= implementationImports %> } from '@angular/router';
+import { Observable } from 'rxjs';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class <%= classify(name) %>Guard implements <%= implementations %> {
+ <% if (implements.includes('CanActivate')) { %>canActivate(
+ route: ActivatedRouteSnapshot,
+ state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
+ return true;
+ }
+ <% } %><% if (implements.includes('CanActivateChild')) { %>canActivateChild(
+ childRoute: ActivatedRouteSnapshot,
+ state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
+ return true;
+ }
+ <% } %><% if (implements.includes('CanDeactivate')) { %>canDeactivate(
+ component: unknown,
+ currentRoute: ActivatedRouteSnapshot,
+ currentState: RouterStateSnapshot,
+ nextState?: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
+ return true;
+ }
+ <% } %><% if (implements.includes('CanLoad')) { %>canLoad(
+ route: Route,
+ segments: UrlSegment[]): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
+ return true;
+ }<% } %>
+}