Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <label data-translate="company"></label>
- <input type="text" ng-model="newItem.company" placeholder="Kód, alebo Názov" uib-typeahead="company for company in getCompanies($viewValue)" typeahead-loading="loadingLocations" typeahead-no-results="noResults" class="form-control" typeahead-input-formatter="formatLabel($model)">
- <i ng-show="loadingLocations" class="glyphicon glyphicon-refresh"></i>
- <div ng-show="noResults">
- <i class="glyphicon glyphicon-remove"></i> No Results Found
- </div>
- $scope.getCompanies = function(val, val2) {
- return $http.get(appConfig.apiUrl.crmCompaniesGet + '?search=' + val, {
- params: {
- company: val,
- sensor: false
- }
- }).then(function(response){
- console.log(response);
- return response.data.results.map(function(item){
- console.log(item.title);
- return item.title;
- });
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement