I am referring to the Require Load recipe in the cookbook here
All the three modules here refer to their respective typescript exports, in their oj-bind-text value bindings.
Now if I had a class FirstView in the first module. how would I "marry" that to the view binding declarations? In other words, from the default instance of a class named FirstView in my viewModel class, I want to refer to say a string greeting.
How can I pass this FirstView reference in the following line:
<oj-bind-text value=[[FirestView.greeting]]/>
or
<oj-bind-text value=[[greeting]]/> ?
My FirstView.ts file, which is the viewModel in my moduleConfig is:
class FirstView{
greeting:ko.Observable<string> = ko.observable("Hello");
}
export new FirstView() as firstView();
Sub question:
When I declare the moduleCOnfig binding as done in the above recipe, is the FirstView class instantiated also? What I saw was that static lines are executed but the class itself is not instantiated unless the export new instance was specifically done.
Also, does the moduleConfig binding in this recipe automatically take care of executing the Promise and its callback (if any)?
Please help.