This file contains 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 Component from '@glimmer/component'; | |
export default class extends Component { | |
activeIndex = 0; | |
constructor(owner, args) { | |
super(owner, args); // what is owner? | |
// connections is provided here and is the same as @connections in the hbs file | |
const connections = args.connections | |
connections[this.activeIndex].active = true; | |
This file contains 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({ | |
appName: 'Ember Twiddle', | |
isActive: false, | |
notActive: Ember.computed.not('isActive'), | |
actions: { | |
handleClick() { |