SHARE
TWEET

Untitled

a guest Jul 15th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Data Service */
  2. getMessages() {
  3.   const dataArray = [];    
  4.   for (let index = 1; index < 25; index++) {      
  5.     const userName = this.faker.internet.userName();      
  6.     const content = this.faker.company.catchPhrase();      
  7.     const date = this.faker.date.recent();      
  8.     const data = { userName, content, date, index };        
  9.     dataArray.push(data);    
  10.   }
  11.   return of(dataArray); // RxJS Observable
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top