-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Modal service not reflecting bindings? #2275
Comments
I asked it also on StackOverflow with more code: https://stackoverflow.com/questions/45309095/modal-not-reflecting-bindings Updated question here with the extra code bits. |
In your component inject private cd: ChangeDetectorRef and run detectChanges at the end of you afterModelLoad method
But it would be nicer that the show method BsModalService provided a way to pass data to initialize the component with. |
Thanks @jvanrossum I'll try that, but yeah, that'd be nice! |
I don't think the detectChanges solution works with inputs using
[(ngModel)]. I have a modal containing a form and it's a complete no-go for
me at this point.
…On Thu, Jul 27, 2017, 05:41 Eros Stein ***@***.***> wrote:
Thanks @jvanrossum <https://github.com/jvanrossum> I'll try that, but
yeah, that'd be nice!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2275 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AArFU9LPhC_vqTC9VEpEjtN9rilfVJIpks5sSHeGgaJpZM4OipPn>
.
|
@samhoward86 I agree, it works for me, but being forced to run Btw, @IlyaSurmay do you have an ETA on the 1.8.1 release? Thanks for the quick fix! |
@eestein probably tomorrow, but can't say for sure. we're not planning to include a lot of stuff in the next version so I think it will be released soon |
@IlyaSurmay thank you! |
@eestein i am also getting same issue ... but the detectChanges() is not working for me ... any ideas about other fixes ...? |
@aakritiOpallios unfortunately no, are you using the latest version? It seems this was fixed by #2293 |
@eestein i am using 2.0.0-beta.8 version of bootstrap modal |
Hi, thank you for releasing the modal service!
I have a problem, though. I have the following code:
The items are correctly being passed on to the component, but it's not reflecting on my modal:
{{model.title}}
is blank.I'm >>assuming<< maybe it's because the modal is first shown and then it won't update anymore? Is it something wrong with my code? If I debug it the model is there the problem is it won't reflect on the view (HTML).
The model is not reflecting on the modal's view. The object is updated, but not reflected on the view. Here are the important bits:
BaseModalComponent
:ModalComponent
:And finally the view:
Description is always blank. If I add a debugger inside
afterModelLoad
thedescription
is set, but it doesn't update the view.Any ideas?
Thanks.
The text was updated successfully, but these errors were encountered: