Why is the same view navigated twice in the Durandal log?

254 views Asked by At

I have a Durandal 2.o application that apparently works fine. It is build as a standard vm/view construction with one parent and one child router levels.

However, I have a small phenomena that occurs that's giving me som unwanted sideeffects in the DOM. When trying to find what is causing the problem I can see that everytime I do a hash navigation everything seems to happen twice. Why? Is this normal behaviour by Durandal?

Extract from the logfile in Chrome:

Object {router: Object, toolBarItems: Array[3], toolItemsPullRight: function, groupsmerged: function, enableBack: function…} 
Object {fragment: "**activity/list**", queryString: null, config: Object, params: Array[1], queryParams: null}  system.js:75
Activating 
Object {listmerged: function, searchText: function, dsacty: Object, dssbag: Object, dssupp: Object…}  system.js:75

Navigation Complete

Object {listmerged: function, searchText: function, dsacty: Object, dssbag: Object, dssupp: Object…}  
Object {fragment: "**activity/list**", queryString: null, config: Object, params: Array[1], queryParams: null}  system.js:75
Binding vmActivity/comps/list 
Object {listmerged: function, searchText: function, dsacty: Object, dssbag: Object, dssupp: Object…}  system.js:75
Activating 
Object {router: Object, toolBarItems: Array[3], toolItemsPullRight: function, groupsmerged: function, enableBack: function…}  system.js:75

Navigation Complete

1

There are 1 answers

0
Jan R On BEST ANSWER

After a good night sleep and looking closer at this I can see that this is the normal logfile in Durandal. It looks weird because I in most views are using an attached child-router. The child-router happens to be namned the same as it's parent and thus appearing a bit confusion in the logfile where it looks like it's activated twice. :)