These are chat archives for meteor-space/general
BlazeComponents. So you never have
Dependencies: myMediator: 'Mediator'in some other class, that's why those transient objects will never be referenced by mappings and we don't have memory leaks :-D
Space.Injector::releaseAPI for special cases, like when you want to swap out long-living sub-systems and free their references.
RouteControllerthat handles all the logic of redirects etc. based on events
FormSubmittedevent that redirects
commands. Components like the
RouteControllerbasically translate that from/to the language of your application and shield the rest from these details.
flow-routeror the next big routing engineTM
ApplicationHelperssingleton that you require where you need it
but of course you can also just use a vanilly object API like
MyHelpers = pluralize: (word) -> … otherHelper: -> …
and reference that in your code
btw. the injection system supports auto-mapping, so you don't have to map
MyHelpers in this case but can just require it via:
Dependencies: helpers: 'MyHelpers'
MyHelpers is globally accessible it will just auto-map it for you behind the scenes
Dependenciesyou can just use it like:
class MyComponent extends Space.ui.BlazeComponent @register 'my_blaze_template' Dependencies: helpers: 'MyHelpers' myFunc: -> @helpers.pluralize('item')
class MyComponent extends Space.ui.BlazeComponent @register 'my_blaze_template' myFunc: -> MyHelpers.pluralize 'item'
space:firstname.lastname@example.org a better way to configure modules and applications: