Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(uiState): add ui-state directive #2187

Merged
merged 1 commit into from
Aug 19, 2015
Merged

feat(uiState): add ui-state directive #2187

merged 1 commit into from
Aug 19, 2015

Conversation

nateabele
Copy link
Contributor

  • Refactor StateRefDirective for better modularity
  • Drop key restrictions on ui-sref-opts
  • Improves performance over prior implementation with no extra $eval()’s

Fixes #395, #900, #1932

cc: @kasperlewau @christopherthielen

 - Refactor StateRefDirective for better modularity
 - Drop key restrictions on ui-sref-opts
 - Improves performance over prior implementation with no extra $eval()’s

Fixes #395, #900, #1932
expect(angular.element(template[0]).attr('href')).toBe('#/contacts');

scope.state = 'contacts.item';
scope.params = { id: 5 };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks way better to me than what I previously had; https://github.com/kasperlewau/ui-router/commit/110d793ee6591b139d390f49c642edc93326fe74#diff-e571eaac1af787a06dfe6dfe7210a4d9R312.

Specifying the state ref including the params as a string felt sort of wonky when all things come around. Makes more sense to split it. 👍

@christopherthielen
Copy link
Contributor

👍

1 similar comment
@christopherthielen
Copy link
Contributor

👍

@christopherthielen christopherthielen modified the milestones: 0.2.16, 1.0.0-preview Aug 19, 2015
nateabele added a commit that referenced this pull request Aug 19, 2015
feat(uiState): add ui-state directive
@nateabele nateabele merged commit 887890e into master Aug 19, 2015
@eddiemonge eddiemonge deleted the ui-state-directive branch August 19, 2015 18:44
@jasdeepsingh
Copy link

👍 needed this. thanks ;)

@vinothbabu
Copy link

Was looking for this... thanks guys...

@mrmashal
Copy link

Thanks for the dynamic ui-sref, but:

  1. How it should be used? Is it: <a ui-state="state" ui-state-params="params" ui-state-opts="{ absolute: true }"></a>?
  2. Does it support passing state parameters that are not used in the URL?

@Travistom
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants