Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Knockout js in oracle jet?

Muralidharan KJun 7 2018 — edited Jun 7 2018

Hi all

I am new to oracle jet. I'm now learning knockout.js and i intend to implement some of the tutorials given in knockout.com official website in oracle jet. http://learn.knockoutjs.com/#/?tutorial=collections

when i tried to implement the example given in above link i got stuck due to some errors, i've followed the exact steps given in tutorial but it says following error

Uncaught (in promise) TypeError: Unable to process binding "foreach: function(){return seats }"

Message: Unable to process binding "options: function(){return $root.availableMeals }"

Message: Cannot read property 'availableMeals' of null

at options (eval at createBindingsStringEvaluator (knockout-3.4.2.debug.js:2992), \<anonymous>:3:73)

at update (knockout-3.4.2.debug.js:4452)

at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout-3.4.2.debug.js:3383)

at Function.evaluateImmediate\_CallReadThenEndDependencyDetection (knockout-3.4.2.debug.js:2183)

at Function.evaluateImmediate\_CallReadWithDependencyDetection (knockout-3.4.2.debug.js:2150)

at Function.evaluateImmediate (knockout-3.4.2.debug.js:2111)

at Object.ko.computed.ko.dependentObservable (knockout-3.4.2.debug.js:1964)

at knockout-3.4.2.debug.js:3381

at Object.arrayForEach (knockout-3.4.2.debug.js:159)

at applyBindingsToNodeInternal (knockout-3.4.2.debug.js:3353)

When i add the following line my UI dosen't works as expected.

<select data-bind="options: $root.availableMeals, value: meal, optionsText: 'mealName'"></select>

This is the expected output

pastedImage_0.png

But my UI shows like

pastedImage_2.png

How to clear this error?

Thanks

This post has been answered by Andrew Bennett on Jun 7 2018
Jump to Answer
Comments
Post Details
Added on Jun 7 2018
8 comments
929 views