Advertisement
Guest User

Untitled

a guest
May 7th, 2014
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var phonecatApp = angular.module('phonecatApp', []);
  2.  
  3.  
  4. phonecatApp.controller('PhoneListCtrl', function ($scope) {
  5.     $scope.phones = [
  6.     {'name': 'Nexus S',
  7.     'snippet': 'Fast just got faster with Nexus S.'},
  8.     {'name': 'Motorola XOOM™ with Wi-Fi',
  9.     'snippet': 'The Next, Next Generation tablet.'},
  10.     {'name': 'MOTOROLA XOOM™',
  11.     'snippet': 'The Next, Next Generation tablet.'},
  12.     ];
  13.  
  14.     var hi = new GlideRecord('123')
  15.     hi.get('4c76677e111c210013e9578fb556a947');
  16.     $scope.phones.push({'name': hi.name,
  17.     'snippet': 'The Next, Next Generation tablet.'});
  18.  
  19.     var hi2 = new GlideRecord('123')
  20.     hi2.encodedQuery = 'sys_updated_by=abcd';
  21.     hi2.query(recResponse);
  22.     function recResponse(hi2) {
  23.         while (hi2.next()) {
  24.       $scope.phones.push({'name': hi2.name,
  25.     'snippet': 'The Next, Next Generation tablet.'});
  26.         }
  27.     }
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement