If you need to enumerate over a list of objects, use Handlebar's {{#each}}
helper:
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.Component.extend({ | |
componentName: "inner-component", | |
actions: { | |
handleComponentChange() { | |
this.set('componentName', "second-component"); | |
} | |
} | |
}); |
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
/* Fixed Opcode */ /* Operand? */ /* Operand? */ /* Operand? */ | |
[0bIIIIIIIILLRRRRRR, 0bAAAAAAAAAAAAAAAA, 0bAAAAAAAAAAAAAAAA, 0bAAAAAAAAAAAAAAAA] | |
/* | |
I = instruction (opcode) type | |
L = operand length | |
R = reserved | |
A = operand value | |
*/ |
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
APPEND_OPCODES.add(Op.OpenElement, (vm, { op1: tag }) => { | |
vm.elements().openElement(vm.constants.getString(tag)); | |
}); |
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
const Program = [25, 1, 0, 0, 22, 2, 0, 0, 32, 0, 0, 0]; |
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
[ | |
["open-element", "h1", []], | |
["text", "Hello World"], | |
["close-element"] | |
] |
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
resolve<U>(handle: number): U { | |
return this.table[handle]; | |
} |
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 UserProfile from './src/ui/components/UserProfile/component'; | |
/* ...other component imports */ | |
export let table = [ | |
/* Component1 */, | |
/* Component2 */, | |
/* ... */, | |
/* Component41 */, | |
UserProfile, | |
/* Component43 */, |
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
// This is the API for constructing a Glimmer.js application with | |
// precompiled binary bytecode templates and using an async renderer | |
// (via requestAnimationFrame, requestIdleCallback, etc). | |
import Application, { DOMBuilder, AsyncRenderer, BytecodeLoader } from '@glimmer/application'; | |
import data from './__compiled__/data'; | |
let bytecode = fetch('./__compiled__/templates.gbx') | |
.then(req => req.arrayBuffer()); |
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
'use strict'; | |
const GlimmerApp = require('@glimmer/application-pipeline').GlimmerApp; | |
class ModuleApp extends GlimmerApp { | |
package(tree) { | |
return tree; | |
} | |
} |