Ember 1.13 components now have a property called positionalParams which pulls out the parameters in order that were provided in handlebars. It allows an invocation like

{{bootstrap-button success btn-sm}}

instead of

{{bootstrap-button classes='success btn-sm'}}

You can then access those parameters in the component using positionalParams in two ways. Firstly as an array:

Ember.Component.extend({  
  positionalParams: 'classes'
});

this.get('classes'); // ['success', 'btn-sm']  

If you pass an array you can assign each param to named items e.g.

Ember.Component.extend({  
  positionalParams: ['firstName', 'lastName']
});

this.get('firstName');  
this.get('lastName');  

For more information check out @ef4's commit.

https://github.com/emberjs/ember.js/commit/995e2d2e0d5e6ae54afb6f3095c3d1efb20cdcfc

Tags: