Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. exports.index = function(req, res){
  2. Licmgt.find(function (err, licMgts) {
  3. if(err) { return handleError(res, err); }
  4. return res.json(200, licMgts);
  5. });
  6. };
  7.  
  8. <input class="form-control" typeahead="sourceArray as sourceArray for sourceArray in getOneID($viewValue)"
  9. ng-model="asyncSelected" type="text">
  10. <i ng-show="oneid" class="glyphicon glyphicon-refresh" ></i>
  11.  
  12. $scope.getOneID = function(val){
  13. console.log("value is " + val);
  14. return $http.get('/api/licMgts/',{
  15. params: {
  16. OneID:val
  17. }
  18. }).then(function(res){
  19. var oneIDs =[];
  20. angular.forEach(res.data,function(item){
  21. oneIDs.push(item.OneID);
  22. });
  23. return oneIDs;
  24. });
  25. };
  26.  
  27. db.collections.find({$text:{$search: /keyword/}})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement