大佬教程收集整理的这篇文章主要介绍了angularjs – 从typeahead中选择一个显示Objec对象的值,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
<div class="bs-example" style="padding-bottom: 24px;" append-source> <form class="form-inline" role="form"> <div class="form-group"> <label><i class="fa fa-globe"></i> State</label> <input type="text" class="form-control" ng-model="SELEctedState" ng-options="state.FirstName for state in states" placeholder="Enter state" bs-typeahead> </div> </form> </div>
这是我的AngularJS代码
var app = angular.module('mgcrea.ngStrapDocs',['ngAnimate','ngSanitize','mgcrea.ngStrap']) .controller('TypeaheadDemoCtrl',function ($scope,$templateCache,$http) { $scope.SELEctedState = ''; $http.get('/api/servicesapi/GetAllClients') .then( function (result) { //success $scope.states = result.data; },function () { //error }); });
看到这里的图像
以上是大佬教程为你收集整理的angularjs – 从typeahead中选择一个显示Objec对象的值全部内容,希望文章能够帮你解决angularjs – 从typeahead中选择一个显示Objec对象的值所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。