我正在尝试使用一些参数搜索记录并在显示模式上获取搜索结果,我很高兴发布搜索参数并获取范围数据,但没有获得关于揭示模式的相同数据。 这是我的工作方式。
我的观点:
<div class="caption" ng-controller="mysearchfilter">
<form ng-submit="mysearchattempt($event)">
<div class="row">
<div class="large-6 medium-6 columns padding-none">
<span class="caption-span">I'm serach by</span>
<div class="large-6 medium-6 columns">
<input ng-model="search.requirements" type="text" placeholder="Internship Keyword">
</div>
<div class="large-6 medium-6 columns">
<input ng-model="search.title" type="text" placeholder="Major">
</div>
</div>
<div class="large-6 medium-6 columns padding-none">
<span class="caption-span left-pad">Location</span>
<div class="large-6 medium-6 columns">
<input ng-model="search.city" type="text" placeholder="City, State, or Zip Code">
</div>
<div class="large-6 medium-6 columns last-button">
<button class="button tiny orange-button width-button" type="submit" >
<img src="img/search.png" style="width:166px;" >
</button>
</div>
</div>
</div>
</form>
</div>
我的JS
customApp.controller('mysearchfilter',["$scope","CommonServices","toaster",function($scope,CommonServices,toaster){
$scope.jobsFound=[];
$scope.greet='hi';
$scope.mysearchattempt=function(eventP){
eventP.preventDefault();
console.log($scope.search);
CommonServices.saveData($scope.search,'mysearchbox').
success(function(responseData){
if(responseData.Success){
$scope.jobsFound=responseData.Success;
console.log($scope.jobsFound);
}
else if(responseData.Fail){
toaster.pop('warning','','No Such Jobs Found');
}
else {
toaster.pop('error','','Contact Support');
}
$('#myJobs').foundation('reveal', 'open');
}).
error(function(responseData){
toaster.pop('error','','Http Error.');
});
}
}]);
我的模态部分。
<div ng-controller="mysearchfilter">
<div id="myJobs" class="reveal-modal xlarge" data-reveal>
<div class="form-container">
<div class="row">
<div class="large-12 columns">
{{jobsFound}}
<table>
<thead>
<tr>
<th>SNo.</th>
<th>Job Title</th>
<th>Requirements</th>
<th>Description</th>
<th>Location</th>
<th>Position</th>
<th>Type</th>
<th>Apply</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="jobs in jobsFound">
<td>{{$index+1}}</td>
<td>{{jobs.title}}</td>
<td>{{jobs.requirements}}</td>
<td>{{jobs.description}}</td>
<td>{{jobs.City}},{{jobs.state}}</td>
<td>{{jobs.position_required}}</td>
<td>{{jobs.hours}} , {{jobs.compensation}}</td>
<td ng-if="jobs.status=='active'"><button class="success">Apply</button></td>
<td ng-if="jobs.status=='deactive'"><button class="dissabled danger">Expired</button></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<a class="close-reveal-modal">×</a>
</div>
<div class="footer-bottom">
<div class="row">
<div class="large-12 columns">
<div class="large-6 columns">
<span>2014 © Internbuddy.com,All rights reserved.</span>
</div>
<div class="large-6 columns right-part">
<span>Developed & design by:Intellectual Boot</span>
</div>
</div>
</div>
</div>
</div>
我在控制台中获得jobsFound
范围,但在揭示模式上没有.Pleas建议我犯了什么错误。