Sunday 15 August 2010

knockout.js - Durandal canDeactive lifecycle callback -


When I return false, I currently call my canteactive callback twice.

The call stack is similar to the only difference, which is different values ​​in each call on the function args variable found in system.js.

For the first time in my nested settime, my breakpoint is killed. I have the value of navigating to see algos.

The second time round (second split) the value of Argus is my current view which I have said that it can not be inactive.

Is this voice familiar to anyone?

Edit more info

My setup: (- nesting) - P> shell

- title

-view1

- nested view (forced using nose)

-view2

- View3

- Nested View

I have a property on each view to navigate between the scenes, which it tells the title of the page and any link items, for example View 1 Header: "Page 1", link [{Path: "# / View 2"}] for each of my thoughts A requires 'header view' and sets it to activate these options (I dislike this piece because it looks like a hack but it is for another day).

When I click on a link, I call the function on the shell which in turn has the router. NavigateTo ( the path of the item is clicked ) or back to view 3.

I can activate this problem with all thoughts (1,2 and 3), and other lifecycle callbacks once in the hope of fire and in the correct order.

Sorry for the lack of code, but I'm not sure where it looks, which controls the need for navigation (due to the difference mentioned above)

I have fixed my problem, problem children were my default.html, which allowed my script import to be an application Piece). My detractive can fire a couple of times to get a false return.

No comments:

Post a Comment