.hbs 文件中的以下代码等效于什么
What would be the equivalent of following code in .hbs file
我正在从事一个涉及节点、猫鼬、车把、快递的项目。 handlebars 中的以下代码等效于什么?
<div class="panel panel-default" ng-init="getExams()">
<div class="panel-heading">
<h3 class="panel-title">Exams</h3>
</div>
<div class="panel-body">
<div class="row">
<div ng-repeat="exam in exams">
<div class="col-md-6">
<div class="col-md-6">
<h4>{{exam.examName}}</h4>
<a class="btn btn-primary" href="#/exams/details/{{exam._id}}">View Details</a>
</div>
</div>
</div>
</div>
我想在我的模型中显示以下函数输出的所有行。
module.exports.getExams = (callback, limit) => {
Exam.find(callback).limit(limit);
}
在 node.js 中,渲染时:
res.render('your view'),{exams:exams}
在把手中:
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Exams</h3>
</div>
<div class="panel-body">
<div class="row">
{{#each exams}}
<div>
<div class="col-md-6">
<div class="col-md-6">
<h4>{{examName}}</h4>
<a class="btn btn-primary" href="#/exams/details/{{_id}}">View Details</a>
</div>
</div>
</div>
{{/each}}
</div>
我正在从事一个涉及节点、猫鼬、车把、快递的项目。 handlebars 中的以下代码等效于什么?
<div class="panel panel-default" ng-init="getExams()">
<div class="panel-heading">
<h3 class="panel-title">Exams</h3>
</div>
<div class="panel-body">
<div class="row">
<div ng-repeat="exam in exams">
<div class="col-md-6">
<div class="col-md-6">
<h4>{{exam.examName}}</h4>
<a class="btn btn-primary" href="#/exams/details/{{exam._id}}">View Details</a>
</div>
</div>
</div>
</div>
我想在我的模型中显示以下函数输出的所有行。
module.exports.getExams = (callback, limit) => {
Exam.find(callback).limit(limit);
}
在 node.js 中,渲染时:
res.render('your view'),{exams:exams}
在把手中:
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Exams</h3>
</div>
<div class="panel-body">
<div class="row">
{{#each exams}}
<div>
<div class="col-md-6">
<div class="col-md-6">
<h4>{{examName}}</h4>
<a class="btn btn-primary" href="#/exams/details/{{_id}}">View Details</a>
</div>
</div>
</div>
{{/each}}
</div>