Created
May 20, 2016 20:52
-
-
Save mgol/300506354640c04a89764ee022b891c2 to your computer and use it in GitHub Desktop.
This file contains 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 template from './my-dummy.html'; | |
import './my-dummy.scss'; | |
const deps = new WeakMap(); | |
class MyDummyController { | |
constructor($timeout, $q) { | |
'ngInject'; | |
deps.set(this, {$timeout, $q}); | |
} | |
doSomething() { | |
const {$timeout, $q} = deps.get(this); | |
/* | |
* Do something with $timeout & $q. | |
*/ | |
} | |
} | |
const myDummyComponent = { | |
bindings: { | |
$router: '<', | |
}, | |
template, | |
controller: MyDummyController, | |
}; | |
angular | |
.module('myDummy', []) | |
.component('myDummy, myDummyComponent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment