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
var style = "font-size: 24px;" + | |
"background: #67b26f; /* fallback for old browsers */" + | |
"background: -webkit-linear-gradient(to right, #67b26f, #4ca2cd); /* Chrome 10-25, Safari 5.1-6 */" + | |
"background: linear-gradient(to right, #67b26f, #4ca2cd); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */" + | |
"color: white;" + | |
"text-align: center;" + | |
"padding: 10px 15px;" + | |
"width: 100%;" + | |
"border-radius: 20px;"; |
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 {Injectable} from '@angular/core'; | |
import {ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree} from '@angular/router'; | |
import {Observable} from 'rxjs'; | |
import {AngularFirebaseService} from '../services/angular-firebase.service'; | |
import {map, take, tap} from 'rxjs/operators'; | |
import {User} from '../interfaces/user'; | |
import {ConsoleLoggerService} from '../services/console-logger.service'; | |
@Injectable({ | |
providedIn: 'root' |
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 {Injectable} from '@angular/core'; | |
import {ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree} from '@angular/router'; | |
import {Observable} from 'rxjs'; | |
import {AngularFirebaseService} from '../services/angular-firebase.service'; | |
import {map, take, tap} from 'rxjs/operators'; | |
import {User} from '../interfaces/user'; | |
import {ConsoleLoggerService} from '../services/console-logger.service'; | |
@Injectable({ | |
providedIn: 'root' |
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 {Subject} from 'rxjs'; | |
export class RxjsHelper { | |
static destroySubject(subject$: Subject<any>): void { | |
if (subject$) { | |
subject$.next(); | |
subject$.complete(); | |
} | |
} | |
} |
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
export class DateHelper { | |
static createDate(): number { | |
return Date.now(); | |
} | |
static formatDate(timestamp: number): string { | |
return new Date(timestamp).toUTCString(); | |
} | |
} |
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 {Pipe, PipeTransform} from '@angular/core'; | |
import {DateHelper} from '../utilities/date-helper'; | |
@Pipe({ | |
name: 'dateFormat' | |
}) | |
export class DateFormatPipe implements PipeTransform { | |
transform(date: number): string { | |
return DateHelper.formatDate(date); | |
} |
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 {Pipe, PipeTransform} from '@angular/core'; | |
import {DomSanitizer, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl} from '@angular/platform-browser'; | |
export type SafePipeType | |
= 'html' | |
| 'style' | |
| 'script' | |
| 'url' | |
| 'resourceUrl'; |
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
export interface User { | |
uid: string; | |
email: string; | |
displayName: string; | |
photoURL: string; | |
roles: Roles; | |
} | |
export interface Roles { | |
subscriber?: boolean; |
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
export interface Post { | |
id: string; | |
pageId: string; | |
title: string; | |
content?: string; | |
createdAt: number; | |
updatedAt: number; | |
} |
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
export interface Page { | |
id: string; | |
title: string; | |
url: string; | |
createdAt: number; | |
updatedAt: number; | |
} |
NewerOlder