Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs($routeProvider): document resolveAs and assiging resolve map on scope #13498

Closed
wants to merge 2 commits into from

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Dec 10, 2015

Related to #13400.

@gkalpak gkalpak force-pushed the docs-ngRoute-resolveAs branch 2 times, most recently from fbbc29b to fc32627 Compare December 10, 2015 21:52
@shahata
Copy link
Contributor

shahata commented Dec 10, 2015

It might be nice to explain that the reasoning behind this feature is to allow passing the resolved locals as bindings to components. Short example:

$routeProvider.when('/', {
  template: '<my-app items="$resolve.items" />',
  resolve: {items: ($http) => $http.get()}
});

@gkalpak
Copy link
Member Author

gkalpak commented Dec 10, 2015

Good suggestion, @shahata. I added another commit with examples with components and other minor improvements. PTAL

@gkalpak gkalpak force-pushed the docs-ngRoute-resolveAs branch from 3ae53df to 1c07fba Compare December 11, 2015 21:50
@gkalpak gkalpak closed this in c7ed8a3 Dec 11, 2015
@gkalpak gkalpak deleted the docs-ngRoute-resolveAs branch December 11, 2015 23:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants