daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import Ember from 'ember';
  2. import { Promise as EmberPromise } from 'rsvp';
  3.  
  4. export default Ember.Component.extend({
  5.   classNames: ['foo-bar'],
  6.   wait: 0,
  7.   text: '',
  8.   toDisplay: null,
  9.  
  10.     willInsertElement() {
  11.     const wait = this.get('wait');
  12.  
  13.     new EmberPromise((resolve, reject) => {
  14.       setTimeout(() => {
  15.         this.set('toDisplay', this.get('text'));
  16.         resolve();
  17.       }, (wait * 1000));
  18.     })
  19.   }
  20. });
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
 
Top