angular-ui / bootstrap

PLEASE READ THE PROJECT STATUS BELOW. Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!
http://angular-ui.github.io/bootstrap/
MIT License
14.3k stars 6.74k forks source link

Resolve not bound to component controller like with UI Router #6540

Open felixfbecker opened 7 years ago

felixfbecker commented 7 years ago

The modal documentation states (emphasis mine):

resolve (Type: Object) - Members that will be resolved and passed to the controller as locals; it is equivalent of the resolve property in the router.

But it behaves differently than the resolve property in UI Router:

Resolve data can be provided to the component via the component's bindings object (for 1.3+ directives, the bindToController is used; for other directives, the scope declaration is used). For each binding declared on the component, any resolve with the same name is set on the component's controller instance. The binding is provided to the component as a one-time-binding. In general, components should likewise declare their input bindings as one-way ("<").

UI Router binds resolve properties to the controller, while UI Bootstrap passes a resolve object that holds these properties. That couples the component to UI Bootstrap and makes it only usable inside a Modal. Resolve properties should be bound to the controller as bindings like UI Router does.

WVWillHall commented 7 years ago

I think it is referring to https://docs.angularjs.org/api/ngRoute/provider/$routeProvider