Guest User

Untitled

a guest
Apr 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. // factory-registry.js
  2.  
  3. export default FactoryRegistry {
  4. static register(name, klass) {
  5. this._factories = this._factories || {};
  6. this._factories[name] = klass;
  7. }
  8. }
  9.  
  10. // factory instance
  11.  
  12. import Factory from './factory-registry.js';
  13.  
  14. export default FactoryInstance {
  15.  
  16. build(){
  17. // DOIT
  18. }
  19.  
  20. }
  21.  
  22. // The problem, in dev this gets invoked, but in production
  23. // it doesn't, is this an ember-cli build optimization to lazily evaluate
  24. // classes?
  25. FactoryRegistry.register('factoryInstance', FactoryInstance)
Add Comment
Please, Sign In to add comment