Skip to content

Instantly share code, notes, and snippets.

View samvloeberghs's full-sized avatar
💭
AMA about Angular, TypeScript, PWA, HTML5 and the web in general!

Sam Vloeberghs samvloeberghs

💭
AMA about Angular, TypeScript, PWA, HTML5 and the web in general!
View GitHub Profile
/* tslint:disable */
const program =
`
module "login"
go to "app/login"
fill "[email protected]" in "#username"
fill "foobar" in "#password"
click "#login"
@ocombe
ocombe / translateUniversalLoader.ts
Last active May 11, 2023 07:01
ng2-translate file loader for Angular Universal (server side)
import {TranslateLoader} from "ng2-translate/ng2-translate";
import {Observable} from "rxjs/Observable";
import fs = require('fs');
export class TranslateUniversalLoader implements TranslateLoader {
constructor(private prefix: string = 'i18n', private suffix: string = '.json') {}
/**
* Gets the translations from the server
* @param lang