Activate trigger twice when using composition and activator
381 views
Skip to first unread message
Oğuzhan EREN
unread,
Apr 2, 2014, 9:39:07 AM4/2/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to duran...@googlegroups.com
Hi,
In this example: "http://dfiddle.github.io/dFiddle-2.0/#master-detail", app/masterDetail/default/project.js activate methods trigger twice, because composition defined this: <!--ko compose: activeProject--><!--/ko--> (app/masterDetail/default/index.html)
When I changed composition like this: <!--ko compose:{model: activeProject }--><!--/ko--> problem solved.
What is difference?
Oğuzhan EREN
unread,
Apr 16, 2014, 11:11:45 AM4/16/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to duran...@googlegroups.com
any idea?
2 Nisan 2014 Çarşamba 16:39:07 UTC+3 tarihinde Oğuzhan EREN yazdı:
Garry Taylor
unread,
Apr 17, 2014, 5:43:05 AM4/17/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to duran...@googlegroups.com
I believe that one uses the Durandal Activator then the composition. Both call the activate method. When using the model the activator is not called therefore only composition called activate. Best bet is to read over the code for activator/composition/ViewEngine to see what the difference is, or Maybe Rob can point us in the right direction???
Mike Kidder
unread,
Apr 17, 2014, 10:24:50 AM4/17/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to duran...@googlegroups.com
Technically a bug that its being called twice. There is a bugfix for it in the 2.1 branch. Search this forum for more details on the Activator.
Message has been deleted
Oğuzhan EREN
unread,
Apr 21, 2014, 6:38:14 AM4/21/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to duran...@googlegroups.com
I updated durandaljs from 2.1 branch but same problem , moreover <!--ko compose:{model: activeProject }--><!--/ko--> solution broken its call twice
17 Nisan 2014 Perşembe 17:24:50 UTC+3 tarihinde Mike Kidder yazdı: