This file contains hidden or 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
private base64toBlob(base64Data, contentType): Blob { | |
contentType = contentType || ''; | |
const sliceSize = 1024; | |
const byteCharacters = atob(base64Data); | |
const bytesLength = byteCharacters.length; | |
const slicesCount = Math.ceil(bytesLength / sliceSize); | |
const byteArrays = new Array(slicesCount); | |
for (let sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) { | |
const begin = sliceIndex * sliceSize; |
This file contains hidden or 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 { Directive, HostListener, Renderer } from '@angular/core'; | |
@Directive({ | |
selector: '[noDoubleClick]' | |
}) | |
export class NoDoubleClickDirective { | |
constructor(private renderer: Renderer) { } | |
@HostListener('click', ['$event']) |