Using positional params in components

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:

  positionalParams: 'classes'

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

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

  positionalParams: ['firstName', 'lastName']


For more information check out @ef4's commit.