Hi - In the .NET Core step-by-step guide there is a section for "SAVING THE PERSON" where the _CreatePersonModal.js file is implemented. I understand that the this.init function is invoked when the modal dialog opens and the this.save function when the save button is pressed. What I don't understand is where the invocation happens.
For instance, when clicking to create a new person, there is a jquery .click event that's registered in the index.js file that fires the modalmanager.open function. That makes sense to me, but I don't see where the this.init and this.save in the _CreatePersonModal.js file are invoked from. Is it in the save-button css class?
Thanks.
2 Answer(s)
-
0
Hi,
When you open a modal with modal manager, it executes init function if it is defined. You can check it here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/master/src/MyCompanyName.AbpZeroTemplate.Web/Common/Scripts/ModalManager.js#L120">https://github.com/aspnetzero/aspnet-ze ... er.js#L120</a> and here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/master/src/MyCompanyName.AbpZeroTemplate.Web/Common/Scripts/ModalManager.js#L85">https://github.com/aspnetzero/aspnet-ze ... ger.js#L85</a> <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/master/src/MyCompanyName.AbpZeroTemplate.Web/Common/Scripts/ModalManager.js#L89">https://github.com/aspnetzero/aspnet-ze ... ger.js#L89</a>
-
0
That's exactly what I needed, thank you!