This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Observable, Subject, from, throwError } from 'rxjs'; | |
import { map, catchError, tap, switchMap } from 'rxjs/operators'; | |
import { Injectable } from '@angular/core'; | |
import { HttpClient, HttpErrorResponse } from '@angular/common/http'; | |
import { AuthService } from 'ngx-auth'; | |
import { TokenStorage } from './token-storage.service'; | |
import { UtilsService } from '../services/utils.service'; | |
import { AccessData } from './access-data'; | |
import { Credential } from './credential'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/app/services/token-interceptor.service.ts | |
import { Injectable } from "@angular/core"; | |
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from "@angular/common/http"; | |
import { AuthenticationService } from "../authentication.service"; | |
import { Observable } from "rxjs/Observable"; | |
import { BehaviorSubject } from "rxjs/BehaviorSubject"; | |
@Injectable() | |
export class RefreshTokenInterceptor implements HttpInterceptor { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new BrowserSyncPlugin({ | |
host: 'localhost', | |
port: 3001, | |
proxy: 'http://localhost:8081/', | |
files: [{ | |
match: [ | |
'**/*.hbs' | |
], | |
fn: function(event, file) { | |
if (event === "change") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (module.hot) { | |
const hotEmitter = require("webpack/hot/emitter"); | |
const DEAD_CSS_TIMEOUT = 2000; | |
hotEmitter.on("webpackHotUpdate", function(currentHash) { | |
document.querySelectorAll("link[href][rel=stylesheet]").forEach((link) => { | |
const nextStyleHref = link.href.replace(/(\?\d+)?$/, `?${Date.now()}`); | |
const newLink = link.cloneNode(); | |
newLink.href = nextStyleHref; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for post in site.posts %} | |
<article class="{% if forloop.first %}first{% elsif forloop.last %}last{% else %}middle{% endif %}"> | |
<div class="article-head"> | |
<h2 class="title"><a href="/{{ post.url }}/" class="js-pjax">{{ post.title }}</a></h2> | |
<p class="date">{{ post.date | date: "%b %d, %Y" }}</p> | |
</div><!--/.article-head--> | |
<div class="article-content"> | |
{{ post.long_description }} | |
<a href="/{{ post.url }}/" class="full-post-link js-pjax">Read more</a> | |
</div><!--/.article-content--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading | |
# slashes. | |
# If your page resides at | |
# http://www.example.com/mypage/test1 | |
# then use | |
# RewriteBase /mypage/test1/ | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f |