-
-
Save feanor07/781c7d3fe211795443a323345c1f1e78 to your computer and use it in GitHub Desktop.
Backtracking re-render #13948
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
_error:{}, | |
error1:Ember.computed('value1', function(){ | |
let x={error1:false}; | |
if(this.get('value1')==='asd'){ | |
x={error1:true} | |
} | |
return x; | |
}), | |
error2:Ember.computed('value2', function(){ | |
let x={error2:false}; | |
if(this.get('value2')==='asd'){ | |
x={error2:true} | |
} | |
return x; | |
}), | |
error:Ember.computed('error1', 'error2', function(){ | |
let error = {}; | |
Ember.merge(error, this.get('error1')); | |
Ember.merge(error, this.get('error2')); | |
return error; | |
}), | |
actions:{ | |
value2updated:function(val){ | |
this.set('value2',val); | |
this.get('value2updated')(); | |
} | |
}, | |
obser:Ember.observer('error', function(){ | |
this.get('onErrorRaised')(this.get('error')); | |
}) | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
item:{ | |
value1:'asd', | |
value2:'qwe', | |
}, | |
error:Ember.computed('externalError', function(){ | |
return Ember.merge({error:false}, this.get('externalError')); | |
}), | |
actions:{ | |
onErrorRaised(error){ | |
this.set('externalError', error); | |
}, | |
v2u(){ | |
this.set('item.value1','er'); | |
} | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.11.1", | |
"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.11.0", | |
"ember-data": "2.11.0", | |
"ember-template-compiler": "2.11.0", | |
"ember-testing": "2.11.0" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment