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
{ | |
"files.exclude": { | |
"**/*.spec.ts": {"when": "$(basename).ts"}, | |
"**/*.js": {"when": "$(basename).ts"}, | |
"**/*.js.map": true | |
}, | |
"window.zoomLevel": -1 | |
} |
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
using System; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace Demo | |
{ | |
public static class EncryptionService | |
{ | |
private static string EncryptionKey = "some-secret-key-longer-or-equal-to-128-bits"; |
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 myReader:FileReader = new FileReader(); | |
myReader.onloadend = (loadEvent:any) => { | |
// do stuff | |
image.src = loadEvent.target.result; // here id display the image before converting it to base64 and upload | |
}; |
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 { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http'; | |
import { Observable } from 'rxjs/Observable'; | |
import { User } from '@models'; | |
@Injectable() | |
export class TokenInterceptor implements HttpInterceptor { | |
get Token(): string { | |
const u: User = JSON.parse(localStorage.getItem('user')); |
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 { environment } from './../../environments/environment'; | |
@Injectable() | |
export class Logger { | |
enabled = true; | |
noop = () => {}; | |
constructor() { |
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
// Modules | |
import { AngularFireModule } from 'angularfire2'; | |
import { AngularFireAuthModule } from 'angularfire2/auth'; | |
import { AngularFirestoreModule } from 'angularfire2/firestore'; | |
import { AngularFireDatabaseModule } from 'angularfire2/database'; | |
imports: [ | |
AngularFireModule.initializeApp(environment.firebaseConfig), | |
AngularFireAuthModule, | |
AngularFirestoreModule, |