ember-composability
Composability-oriented tools for Ember.js apps
Composable components
The child-component-support
and parent-component-support
mixins can be used for parents and children that need aware ness and/or access to each other
For example, you may want to expressively declare some parent/child components like this
{{#my-parent}} {{my-child}} {{my-child}} {{my-child}}{{/my-parent}}
Parent
app/components/my-parent.js
;;; Component;
parents can have access to child properties, via the composableChildren
property
app/components/my-parent.js
totalValue: ;
Child
app/components/my-child.js
;;;; Component;
children can have access to parent properties via the composableParent
property
app/templates/components/my-child.hbs
{{composableParent.name}}
By default, all children will be registered with their parent. If you'd like to customize which components are registered, override the shouldRegisterToParent
method:
{ const registeredChildren = parentComponent; const existingChild = childComponents; return Ember;}
Installation
git clone
this repositorynpm install
bower install
Running
ember server
- Visit your app at http://localhost:4200.
Running Tests
ember test
ember test --server
Building
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.