1
I’m in Trouble when I’m trying to make a GET on the API to get information. The problem is that the webserver is not Calling the API. I must Fill in the ng -model field named.
The following part of the code APP.js.
.state('highways.id', {
url: '/edit/:id',
templateUrl: 'assets/templates/highway/edit.html',
controller: 'HighwayController as ctrl')}
The following part of the code Edit.html.
<div class="form-group">
<label class="col-sm-2 control-label">Rodovia:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputText1" name="highway" ng-model="name" required>
<span class="help-inline" ng-show="validation.highway.$error.required"></span>
</div>
</div>
API
[HttpGet]
public Highway Get(int id)
{
HighwayEntity high = new HighwayEntity(id);
Highway highmap = new Highway();
highmap.InjectFromEntity(high);
return highmap;
}
We are at Sopt please ask in English.
– Diego Filipe Pedro Santos