Comparing version 2.0.3 to 2.1.0
{ | ||
"name": "ngx-auth", | ||
"version": "2.0.3", | ||
"version": "2.1.0", | ||
"description": "Angular 4.3.0+ Authentication module", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/serhiisol/ngx-auth", |
@@ -11,2 +11,5 @@ # Angular 4.3.0+ Authentication | ||
## Full example | ||
Full example you can find in this repo [serhiisol/ngx-auth-example](https://github.com/serhiisol/ngx-auth-example) | ||
## Authentication module | ||
@@ -13,0 +16,0 @@ |
@@ -55,3 +55,3 @@ import { Injectable, Inject } from '@angular/core'; | ||
if (!isAuthorized && !this.isPublicPage(state)) { | ||
this.router.navigateByUrl( this.publicFallbackPageUri ); | ||
this.navigate(this.publicFallbackPageUri); | ||
@@ -93,2 +93,17 @@ return false; | ||
} | ||
/** | ||
* Navigate away from the app / path | ||
* | ||
* @private | ||
* @param {string} url | ||
*/ | ||
private navigate(url: string): void { | ||
if (url.startsWith('http')) { | ||
window.location.href = url; | ||
} else { | ||
this.router.navigateByUrl(url); | ||
} | ||
} | ||
} |
@@ -55,3 +55,3 @@ import { Injectable, Inject } from '@angular/core'; | ||
if (isAuthorized && !this.isProtectedPage(state)) { | ||
this.router.navigateByUrl( this.protectedFallbackPageUri ); | ||
this.navigate(this.protectedFallbackPageUri); | ||
@@ -93,2 +93,17 @@ return false; | ||
} | ||
/** | ||
* Navigate away from the app / path | ||
* | ||
* @private | ||
* @param {string} url | ||
*/ | ||
private navigate(url: string): void { | ||
if (url.startsWith('http')) { | ||
window.location.href = url; | ||
} else { | ||
this.router.navigateByUrl(url); | ||
} | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19147
505
118