-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathold.js
45 lines (36 loc) · 1.03 KB
/
old.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import Ember from 'ember';
export default Ember.Controller.extend({
hasNoDependency: function() {
return true;
}.property(),
hasMultipleDependencies: function() {
return this.getProperties('foo', 'bar');
}.property('foo', 'bar'),
chainedCP: function() {
return false;
}.property('foo').volatile().readOnly(),
isNotExtendingPrototype: Ember.computed(function() {
return true;
}),
isNotExtendingPrototypeWithDependencies: Ember.computed('foo', function() {
return this.get('foo');
}),
simpleObserver: function() {
this.set('bar', true);
}.observes('foo'),
chainedObserver: function(property) {
this.set('baz', true);
}.observes('foo', 'bar').on('init'),
onInit: function() {
this.set('foobar', true);
}.on('init'),
similarMethods: function() {
$(document).on('click', function() {
console.log('someone clicked');
});
users.map(property('name'));
user.observes('name', function() {
console.log('Name changed');
});
}.observes('name').on('init')
});