Skip to content

Instantly share code, notes, and snippets.

@loicgasser
loicgasser / google-fonts-loading-disable.directive.ts
Created May 24, 2019 18:33
Disable the loading of Google Font when loading Google Map API
import { Directive } from '@angular/core';
@Directive({
selector: '[appGoogleFontsLoadingDisable]'
})
export class GoogleFontsLoadingDisableDirective {
constructor() {
const head = document.getElementsByTagName('head')[0] as any;
const insertBefore = head.insertBefore;