Open chrisekelley opened 4 years ago
This is how it's shaping up. In app.component, the following will be iitialized:
// Expose helpers inside T:
window['T'] = {
"form": {
Get: Get
},
"user": this.userService
}
In case, event, and issue related parts, case will be added to T:
this.window['T']['case'] = this.caseService
So far, I'm still keeping other places where instances of caseService are exposed to window so as to not cause bugs in any scripts:
this.window.caseService = this.caseService
Should we split up these properties? For example, having T.form.helpers, T.form.service, T.user.service, T.case.service, etc? Is it going to be awkward to use ${T.form.helpers.Get('fieldName')}
?
window['T'] = {
"form": {
"helpers : {
Get: Get
}
"service : this.formService
},
"user": {
"service" : this.userService
}
}
There is a new doc on using this new T namespace in docs/editor/case-module/custom-case-reports.md
We are beginning to implement a global namespace - $ - for Tangerine helper functions. In order to reduce potential confusion with Jquery '$', how about using the 'T' namespace for Tangy functions?
Additionally, Can we organize all Tangerine functions in this namespace like this: