SHARE
TWEET

Untitled

a guest Apr 18th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import Ember from 'ember';
  2. import { computed } from '@ember/object';
  3.  
  4. export default Ember.Controller.extend({
  5.   something: 0,
  6.   myPropNow: "meh",
  7.   myProp: computed('something', function () {
  8.     let newValue = this.something + 1
  9.     if (this.myPropNow && this.myPropNow === 'meh') {
  10.       newValue++
  11.     }
  12.     // this.set('myPropNow', newValue)
  13.     return newValue
  14.   })
  15. });
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