Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Switch to model based options #46

Open
steve228uk opened this issue Apr 17, 2015 · 1 comment
Open

RFC: Switch to model based options #46

steve228uk opened this issue Apr 17, 2015 · 1 comment

Comments

@steve228uk
Copy link

Currently the Manager and Recogniser options are both attributes that accept JSON (L124), this causes issues when it is necessary to change things like the inputClass as that method requires a function and not a string.

Switching to model based options would be better. This could be done with isolate scope (I don't know if that would cause issues as I haven't tested) or by calling a model on the scope using a value passed into an attribute. For example, Line 124 could become:

managerOpts = scope[attrs.hmManagerOptions]

And instead of passing through JSON you instead pass through a model name:

hm-manager-options="options"

Then all options can be set in a model on the controller.

I'm happy to submit a pull request for this if you're happy with the change. Obviously this would be a breaking change but it would mean that you could change the inputClass, something we need to do in this project.

@RyanMullins
Copy link
Owner

I believe this is covered by #55, please review and update accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants