-
Notifications
You must be signed in to change notification settings - Fork 6.7k
MessageBox broken after 739f86f21a2919654bcb01f3edc6ddeeb1b35c22 #126
Comments
… $routeProvider.when Changing the $dialog service to treat the 'resolve' property the same way as $routeProvider does. It means expecting a string or a factory function instead of a value. Signed-off-by: thiagofelix <[email protected]>
For sure, i'll look right now. There ist'n any testing failing, i will create one to check this condition and commit the source to make it pass. |
@thiagofelix awesome! I'm suspecting that we need to test if an argument passed to an injector is either a function or an array. |
@pkozlowski-opensource this feat introduced a breaking change, because we change what a valid resolve object is. The valid assignment to a key in the resolve object could be only a string ( return an instance of the service ) or a function ( Invoke the method and supply the method arguments from the $injector. ). The previous version accepted that a object could be used, what is the best to do?
I think the second choice is the best ( even if it introduce a breaking change ) because push the $dialog service to work more similar to the same 'resolving properties' concept existing in angularjs. |
@thiagofelix I'm kind of divided here... On one hand it would be nice to keep the same contract as @angular-ui/bootstrap What do you guys think? |
I'm for option 2. I'd better have consistent resolve as people are/will be expecting it from previous experience with routeProvider usage. |
OK, pushed a quick fix updating the resolve syntax to the one used by the routing system. Didn't add tests as both dialog and modal needs to be unified (as well as they tests). See #128 |
Great! happy to see dialog service working more similar to the framework. |
@thiagofelix great that you find it useful! Yes, we definitively want to be as close to the AngularJS-philosophy of directives as possible. And hey, there is no shortage of work for this ambitious project so any contributions are highly welcomed! |
The 739f86f broke message box.
@thiagofelix could you have a look?
The text was updated successfully, but these errors were encountered: