twitter bootstrap - what is this error (Can't bind to 'ngModel' since it isn't a known property of 'input'. ) -




the error printing on console below one... trying add form add employee buton

can't bind 'ngmodel' since isn't known property of 'input'. (" ][(ngmodel)]="model.name" placeholder="enter name">

here error image

the below code of it

<div class = "container"> <h1>{{title}}</h1> <h2>add employee:</h2> <form class="form-horizontal"> <div class="form-group"> <label class="control-label col-sm-2" for="name">name:</label> <div class="col-sm-10"> <input type="text" class="form-control" id="name"  name="name" [(ngmodel)]="model.name" placeholder="enter name"> </div> </div> <div class="form-group">  <label class="control-label col-sm-2" for="position">position:</label> <div class="col-sm-10"> <input type="text" class="form-control" id="position"  name="position" [(ngmodel)]="model.position" placeholder="enter position">  </div> </div>  <div class="form-group"> <label class="control-label col-sm-2" for="salary">salary:</label> <div class="col-sm-10"> <input type="text" class="form-control" id="salary"  name="salary" [(ngmodel)]="model.salary"  placeholder="enter salary"> </div> </div> <div class="form-group">   <div class="col-sm-offset-2 col-sm-10"> <button type="submit" class="btn btn-default" click)="addemployee">add  employee</button> </div> </div> </form> <h2>employee details</h2> <table class="table table-bordered"> <thead> <tr> <th width=400>name</th> <th width=400>position</th> <th width=400>salary</th> <th width=200>actions</th> </tr> </thead> enter code here <tbody> <tr *ngfor="let employee of employees; let i=index"> <td>{{employee.name}}</td> <td>{{employee.position}}</td> <td>{{employee.salary}}</td> <td><a class="btn btn-danger">delete</a></td> </tr></tbody></table></div> 





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -