Format docs using linter and prettier.

This commit is contained in:
Spencer Ofwiti
2021-05-11 20:51:48 +03:00
parent 5228842e61
commit 208c448984
309 changed files with 11327 additions and 3307 deletions

View File

@@ -72,11 +72,6 @@ Dictates access to routes depending on the authentication status.</p>
<p class="comment">
<h3>Example</h3>
</p>
<div class="io-description">
</div>
<section>
<h3 id="index">Index</h3>
@@ -117,7 +112,7 @@ Dictates access to routes depending on the authentication status.</p>
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="17" class="link-to-prism">src/app/_guards/auth.guard.ts:17</a></div>
<div class="io-line">Defined in <a href="" data-line="21" class="link-to-prism">src/app/_guards/auth.guard.ts:21</a></div>
</td>
</tr>
@@ -191,8 +186,8 @@ Dictates access to routes depending on the authentication status.</p>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="35"
class="link-to-prism">src/app/_guards/auth.guard.ts:35</a></div>
<div class="io-line">Defined in <a href="" data-line="38"
class="link-to-prism">src/app/_guards/auth.guard.ts:38</a></div>
</td>
</tr>
@@ -275,7 +270,13 @@ ActivatedRouteSnapshot can also be used to traverse the router state tree.</li>
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Injectable } from &#x27;@angular/core&#x27;;
import {ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree} from &#x27;@angular/router&#x27;;
import {
ActivatedRouteSnapshot,
CanActivate,
Router,
RouterStateSnapshot,
UrlTree,
} from &#x27;@angular/router&#x27;;
// Third party imports
import { Observable } from &#x27;rxjs&#x27;;
@@ -283,14 +284,11 @@ import { Observable } from &#x27;rxjs&#x27;;
/**
* Auth guard implementation.
* Dictates access to routes depending on the authentication status.
*
* @implements CanActivate
*/
@Injectable({
providedIn: &#x27;root&#x27;
providedIn: &#x27;root&#x27;,
})
export class AuthGuard implements CanActivate {
/**
* Instantiates the auth guard class.
*
@@ -309,14 +307,14 @@ export class AuthGuard implements CanActivate {
*/
canActivate(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable&lt;boolean | UrlTree&gt; | Promise&lt;boolean | UrlTree&gt; | boolean | UrlTree {
state: RouterStateSnapshot
): Observable&lt;boolean | UrlTree&gt; | Promise&lt;boolean | UrlTree&gt; | boolean | UrlTree {
if (localStorage.getItem(btoa(&#x27;CICADA_PRIVATE_KEY&#x27;))) {
return true;
}
this.router.navigate([&#x27;/auth&#x27;]);
return false;
}
}
</code></pre>
</div>