LT-275: Creating measure flow component common section

This commit is contained in:
Bruno Alves de Faria committed 2016-08-03 11:13:48 -03:00
1 parent 9a8eaff560
commit bbb7dad905
60 files changed
+391 -156

No files matched your search

@@ -0,0 +1,26 @@
import { Template } from 'meteor/templating';
import { Session } from 'meteor/session';
import { ReactiveVar } from 'meteor/reactive-var';
/**
* Global Blaze UI helpers to work with Blaze
*/
// Return the current template instance
Template.registerHelper('instance', () => {
return Template.instance();
});
// Return the session value for the given key
Template.registerHelper('session', key => {
return Session.get(key);
});
// Return the value for given parameter regardless if it's reactive or not
Template.registerHelper('reactive', parameter => {
if (parameter instanceof ReactiveVar) {
return parameter.get();
}
return parameter;
});