-
-
Notifications
You must be signed in to change notification settings - Fork 321
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
Fix #90 and #71 at the expense of $element
injection
#163
base: master
Are you sure you want to change the base?
Conversation
…and dwmkerr#71 at the expense of `$element` injection
👍 |
1 similar comment
👍 |
Hey @ipavlic I found a little problem in your PR.
I know it's a smaller issue than the one that is fixing but it could be useful to keep track also on this :) |
@sirLisko Yes, that's why the commit message says "at the expense of |
@ipavlic my bad, I didn't read it properly 😅 |
@ipavlic @sirLisko just to confirm, if this means that $scope.cancel = function() {
$element.modal('hide');
} But I do see the issue and think that dropping element is still probably the better solution. Two questions though:
With respect to point 1, it might be that angular are not doing it in all cases (see angular/angular.js#6988). If there seems to be no way around this and still have the element injected, we might just have to go ahead anyway and warn users that the API has changed. |
…sync dwmkerr#71 and dwmkerr#90 with current master
If the controller is instantiated after compiling and linking, any directives included in the model template won't have access to controller input values.
For example, take a modal template which includes a
foo
directive,<foo bar="vm.inputValue"></foo>
. If compile and link functions are executed first, thenfoo
's controller is instantiated during before compilation.However, since the modal controller is instantiated in code after the linking, the
inputValue
is undefined. This makes it impossible to use directives/components which require values from the modal controller.