item.adminUse
正しい出力が得られない "true" または "False"を比較したい
HTML
{% for item in data%}
<tr>
{%if item.adminUse%}
<td >{{item.id}}</td>
<td >{{item.firstName}}</td>
<td >{{item.adminUse}}</td>
{%endif%}
{%endfor %}
脚本
exports.index = function(req, res){
db('stdnt').find().done(function (err, models) {
if ( err )
console.log("Error in Index of Student:"+err);
else
console.log(models)
res.render( 'stdnt/index',{data:models});//, { title: 'CRUD in Node', data: models });
});
};
上記は、そのリンクをレンダリングし、そのデータ「モデル」を送信するコントローラーです。