Handlebar expression doesn't get parsed

50 Views Asked by At

On the pointed line I'm using the extension handlebars of HTML for take the ID of BBDD of mongo but the problem is that the "href" doesn't detect the {{_id}}

<div class="row">
    {{#each notes}}
    <div class="col-md-3">
        <div class="card">
            <div class="card-body">
               <h4 class="card-title d-flex justify-content-between align-items-center">
            {{ title }} <a href="/notes/{{_id}}/edit"><i class="fas fa-edit"></i></a>
                    <!--en el href hacemos referencia
                    a la ubicacion mas el id con handlebars-->
               </h4>
               <p>{{ Description  }}</p>
               <button class="btn btn-danger btn-block btn-sm">
                   Delete
               </button>
            </div>
        </div>
    </div>
    {{else}}
    <div class="card mx-auto">
        <div class="card-body">
            <p class="lead">no existen notas aun</p>
            <a href="/notes/add" class="btn btn-success btn-block">
                Create one
            </a>
        </div>
    </div>
    {{/each}}
</div>
1

There are 1 best solutions below

0
On

on the line {{ title }} , the {{_id}} is not detected for MONGO, i need use this for modify the document in the database