This is a Work In Progress and should not be used in production.
<!-- /app/components/my-component.ember -->
<script>
import Ember from 'ember';
export default Ember.Component.extend({
myVar: 'Testing dynamic vars',
});
</script>
<template>
<h1 id="hello">Hello World!</h1>
<p id="dynamic">{{myVar}}</p>
</template>
<style>
h1 {
color: red;
}
</style>
And use wherever you want {{my-component myVat='test'}}
.
git clone <repository-url>
this repositorycd ember-cli-single-file-components
npm install
ember serve
- Visit your app at http://localhost:4200.
npm test
(Runsember try:each
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
For more information on using ember-cli, visit https://ember-cli.com/.