Skip to content

sfDecorator asking for new/isolated scope #175

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

Closed
morrislaptop opened this issue Nov 26, 2014 · 3 comments
Closed

sfDecorator asking for new/isolated scope #175

morrislaptop opened this issue Nov 26, 2014 · 3 comments

Comments

@morrislaptop
Copy link
Contributor

<form
    class="demeter-schema-form"
    name="UserImpersonationForm"
    sf-schema="schema"
    sf-form="form"
    sf-decorator="everline-schema-form-decorator"
    sf-model="model"></form>
</div>

Then I get the error...

Error: [$compile:multidir] Multiple directives [sfDecorator, sfSchema] asking for new/isolated scope on:

@davidlgj
Copy link
Contributor

davidlgj commented Jan 7, 2015

Ah, that was unfortunate. sf-decorator is a bit broken currently.

A workaround could be to only load your decorator, that way it should default to use it without having to using the sf-decorator directive.

@nikolassv
Copy link

At https://github.com/Textalk/angular-schema-form/blob/development/src/services/decorators.js#L396 the default decorator is named 'sfDecorator'. Unfortunately, this is also the name of the attribute that determines which decorator to use for a form. Is there any good reason why not to change the name to 'sfDefaultDecorator' to prevent further scope conflicts?

@davidlgj
Copy link
Contributor

Hi @nikolassv,

we'll it'll be a lot easier to just change the name of the attribute to something else since then you don't need to update the templates. So I changed it to sf-use-decorator see 446d846

There is still #29 to fix as well though.

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

No branches or pull requests

3 participants