import {View} from 'backbone';
export default class MyView extends View {
initialize() {
this.$el.css('color', 'red');
}
}
import {View} from 'backbone';
const MyView = View.extend({
constructor: function MyView() {
View.apply(this, arguments);
},
initialize() {
this.$el.css('color', 'red');
}
});
export default MyView;
import {Controller, computed} from 'ember';
export default class MyController extends Controller {
@computed('firstName', 'lastName')
fullName() {
return `${this.get('firstName')} ${this.get('lastName')}`;
}
}
import {Controller, computed} from 'ember';
const MyController = Controller.extend({
fullName: computed('firstName', 'lastName', function fullName() {
return `${this.get('firstName')} ${this.get('lastName')}`;
})
});
export default MyController;
export default class MyController {
constructor($scope, $route) {
this.$scope = $scope;
this.$route = $route;
}
}
export default class MyController {
static $inject = ['$scope', '$route'];
constructor($scope, $route) {
this.$scope = $scope;
this.$route = $route;
}
}