gokatz
1/4/2017 - 2:09 PM

get and set try

get and set try

{
  "version": "0.10.7",
  "EmberENV": {
    "FEATURES": {}
  },
  "options": {
    "use_pods": false,
    "enable-testing": false
  },
  "dependencies": {
    "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
    "ember": "2.10.0",
    "ember-data": "2.10.0",
    "ember-template-compiler": "2.10.0",
    "ember-testing": "2.10.0"
  },
  "addons": {}
}
<h1>Welcome to {{appName}}</h1>
<br>
<div {{action 'test'}}>Test</div>
<br>
{{outlet}}
<br>
<br>
import Ember from 'ember';

export default Ember.Controller.extend({
  appName: 'Ember Twiddle',
  a: undefined,
  actions: {
  	test() {
      let a = this.get('a');
      console.log(a)
      Ember.get(a, 'test');
    	//let b = Ember.get(a, 'test');
      //console.log(b)
    }
  }
});