Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Component doesn't refresh when context changes

$
0
0
    I would like create an article list in which the parts of the articles rendered by Components. De article list itself also a Component, this is the template:
    1. {{#each rows}}
    2. <div class="article">
    3. <div class="title">
    4. <a link="javascript:void(0)" articleid='{{ID}}'>{{Title}}</a>
    5. </div>
    6. <div class="published">
    7.    <span class="publish-date">{{getPublished}}</span>
    8.    &nbsp;|&nbsp;
    9.    <authors persons='Author0' articleid="{{ID}}"></authors>
    10.     </div>
    11.     <div class="meta">
    12.         <rating articleid="{{ID}}"></rating>
    13.         <div>|</div>
    14.         <comments articleid="{{ID}}"></comments>
    15.         <div>|</div>
    16.         <keywords taxonomy='Keywords' articleid="{{ID}}"></keywords>
    17.     </div>
    18. <div class="teaser">{{Lead}}</div>
    19. </div>
    20. {{/each}}
    It works well on the first call, but when I ask for the next page, the Components (<authors>, <rating>, <comments>, <keywords>) remains the same, they are not called to refresh. I tried to insert the article ID {{ID}} into the tag to make it changed, but nothing happens.
    The same happens with {{getPublished}} which is a function within the scope, 
    When the length of the list changes, then all updates.
    How can I make them updated?

    Viewing all articles
    Browse latest Browse all 3491

    Trending Articles