You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although according to the docs and examples, you can pass data onto the modal controller using the third parameter data in dialogs.create('address/to/modal/template.html', 'ModalController', data, opts), this is only good for ready data only, and not for asynchronous data.
UI-Bootstrap native modal, has the resolve property to handle asynchronous data, and since this library is build on top of that, how would I got on utilizing this functionality of UI-Bootstrap Modal?
I already tried passing a resolve property inside the fourth parameter opts
but although the function did get called upon opening the modal, I dont know how to get the retrieved data onto my ModalController. I already tried injecting the key name of my async data but with no luck
/* @ngInject */functionModalController($modalInstance,data,asyncData){}// this produce an error stating unknown provider asyncData
The text was updated successfully, but these errors were encountered:
You can fire the modal when the data is available ...
varasyncData=fnWhichReturnsPromise().then(function(result){data.asyncData=result;returndialogs.create('/address/to/modal/template.html','ModalController',data).result;},function(){// something bad happened })
Although according to the docs and examples, you can pass data onto the modal controller using the third parameter
data
indialogs.create('address/to/modal/template.html', 'ModalController', data, opts)
, this is only good for ready data only, and not for asynchronous data.UI-Bootstrap native modal, has the
resolve
property to handle asynchronous data, and since this library is build on top of that, how would I got on utilizing this functionality of UI-Bootstrap Modal?I already tried passing a
resolve
property inside the fourth parameteropts
but although the function did get called upon opening the modal, I dont know how to get the retrieved data onto my
ModalController
. I already tried injecting the key name of my async data but with no luckThe text was updated successfully, but these errors were encountered: