Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.