AngularJS - Best Place for Custom Elements Configuration

Greetings Overflowers,

What is the best practice regarding passing configuration information that will affect specific custom elements behaviour or style?

What I have in mind: as behaviorless custome attributes (i.e. that have no directives defined for them).

Example: I want to configure my custom element because I have "Press" and "Toggle" buttons. Shall I use a custom attribute such as al:type="Toggle", for example, which is not defined as directive (have no affect on my element's behavior, i.e. dummy attribute)? Or there is a better best-practice way?

Kind regards

(If I'm understanding your question correctly..) there isn't a standardized way of doing this, but angular-ui handles this by allowing you to specify the name of a 'value' object that's been registered with the dependency injector. Hard to explain, much easier to show (check out the jquery passthrough under 'how' for an example).

The convention that I personally follow is something like this:

<div myDirective="optionsFn()">foo</div>

where 'optionsFn' returns the options from my controller.