2017-08-03 1 views
1

私が使用しているKurourin meteorJSフレームワークのページ分割パッケージは動作しません。私の火災のhtmlファイルでのみエラーを返します。それはまた私のhtmlファイルの読み込みだけを表示します。私はパッケージにしか入っていないので、ご理解ください。メテオクロインページネーションが動作しない

コードは、私はあなたが直面した同じ問題を持って、私はkurourin GitHubのリポジトリをチェックした雰囲気

//Error 
Error: No such template: defaultBootstrapPaginator 
at blaze.js:3212 
at Blaze.View.<anonymous> (spacebars.js:68) 
at blaze.js:1934 
at Function.Template._withTemplateInstanceFunc (blaze.js:3744) 
at blaze.js:1932 
at Object.Blaze._withCurrentView (blaze.js:2271) 
at viewAutorun (blaze.js:1931) 
at Tracker.Computation._compute (tracker.js:339) 
at new Tracker.Computation (tracker.js:229) 
at Object.Tracker.autorun (tracker.js:613) 

//blaze html file 
<div class="row"> 
{{#if isReady}} 
     <ul class="list-group"> 
      {{#each platforms}} 
       <li class="list-group-item">{{platform}}</li> 
      {{/each}} 
     </ul> 
     {{> defaultBootstrapPaginator pagination=templatePagination limit=10 containerClass="text-center" onClick=clickEvent}} 
{{/if}} 
</div> 


//create_hardwarepl.js file 
Template.create_hardwarepl.onCreated(function() { 
this.pagination = new Meteor.Pagination(Platforms, { 
    sort: { 
     _id: -1 
    } 
}); 
}); 

Template.create_hardwarepl.helpers({ 
platforms: function() 
{ 
    return Platforms.find({},{sort: {createdAt: -1}}); 
}, 
isReady: function() 
{ 
    return Template.instance().pagination.ready(); 
}, 
templatePagination: function() 
{ 
    return Template.instance().pagination; 
}, 
documents: function() 
{ 
    return Template.instance().pagination.getPage(); 
}, 
// optional helper used to return a callback that should be executed before 
    changing the page 
clickEvent: function() 
{ 
    return function(e, templateInstance, clickedPage) 
    { 
     e.preventDefault(); 
     console.log('Changing page from ', 
     templateInstance.data.pagination.currentPage(), ' to ', clickedPage); 
    }; 
} 
}); 

//server/publications.js file 

import { publishPagination } from 'meteor/kurounin:pagination'; 

publishPagination(Platforms); 

Error Image Here

Blaze display

答えて

3

にマニュアルに従って下回っていますページベースの別の購読者があります.click this link

上記のリンク0

はあなた

-1

は流星パッケージkurouninを追加するのに役立ちます:改ページ-炎meteor add kurounin:pagination-blaze

https://atmospherejs.com/i/installing

を参照してください。