Last active
June 28, 2016 13:57
-
-
Save leye0/1a4055696230ce91fbb9894635f1dd61 to your computer and use it in GitHub Desktop.
Typescript / Aurelia css Loader
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
| export default class CSSLoader { | |
| public static load = (path) => { | |
| let head = document.getElementsByTagName('head')[0]; | |
| let link = document.createElement('link'); | |
| link.rel = 'stylesheet'; | |
| link.type = 'text/css'; | |
| link.href = path; | |
| link.media = 'all'; | |
| head.appendChild(link); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment