likeastore / ngDialog

Modals and popups provider for Angular.js applications
http://likeastore.github.io/ngDialog
3.14k stars 692 forks source link

Nested resolves? #580

Open atdiff opened 6 years ago

atdiff commented 6 years ago

Similar to how ui-router has the ability to nest resolves and inject resolved values into either resolves, is that possible within ng-dialog?

resolve: {
   a: ["$q", 
      function ($q) {
         var deferred = $q.defer();
         deferred.resolve(1);
         return deferred.promise;
      }
   ],
   b: ["$q", "a",
      function ($q, a) {
         var deferred = $q.defer();
         deferred.resolve(a + 2);
         return deferred.promise;
      }
   ]
}