Reputation: 1541
This was working just fine. I think the error first appeared around the time I added a "cacheviews: true" to one of my compose items:
<div id="leftCol">
<section id="content-left">
<div data-bind="compose: { model: leftColTree, preserveContext: true, cacheViews: true }"></div>
</section>
</div>
I have three views at present. I can refresh the current view and navigate to a different one, but once that's done I cannot then go to any other view without triggering the error in the title. I realise this is hard to diagnose, but if anyone has some advice on general things that cause this error then I'd be very grateful thanks!
EDIT To clarify, this goes wrong in "composition.js" (line 352) which is the 2nd line below.
var instruction = binder.getBindingInstruction(context.activeView);
if(instruction.cacheViews != undefined && !instruction.cacheViews){
Upvotes: 0
Views: 461
Reputation: 13
Had this same error message at exactly the same spot in composition.js.
For me changing cacheViews from true to false in shell.html did the trick.
`<div>
<header data-bind="compose: { view: 'nav' }"></header>
<section id="content" class="main container-fluid"
data-bind="router: { transition: 'entrance', cacheViews: true }">
</section>
<footer data-bind="compose: { view: 'footer' }"></footer>
</div>`
to this:
`<div>
<header data-bind="compose: { view: 'nav' }"></header>
<section id="content" class="main container-fluid"
data-bind="router: { transition: 'entrance', cacheViews: false}">
</section>
<footer data-bind="compose: { view: 'footer' }"></footer>
</div>`
Upvotes: 1