Last active
January 29, 2018 10:12
-
-
Save kobvel/45da35aed3c6a93caf833741fa382992 to your computer and use it in GitHub Desktop.
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 { InjectionToken, ValueProvider } from '@angular/core'; | |
interface IHashwords { | |
hash: (hash: string) => string[]; | |
hashStr: (hash: string) => string; | |
random: () => string[]; | |
randomStr: () => string; | |
} | |
const Hashwords: InjectionToken<IHashwords> = new InjectionToken<IHashwords>('hashwords'); | |
const HashwordsProvider: ValueProvider = { provide: Hashwords, useValue: window['hashwords']() }; | |
export { IHashwords, Hashwords, HashwordsProvider }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment