Skip to content

Add flag to disable 'x-' prefix prepended in makeComponentTemplate #3424

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

Closed
jordandh opened this issue May 3, 2017 · 7 comments
Closed

Add flag to disable 'x-' prefix prepended in makeComponentTemplate #3424

jordandh opened this issue May 3, 2017 · 7 comments
Milestone

Comments

@jordandh
Copy link

jordandh commented May 3, 2017

This is a: Feature Request

My version of UI-Router is: 1.0.0

Feature Request

Add a flag to disable the 'x-' prefix that is prepended to component elements in makeComponentTemplate. Adding the prefix can interfere with css and dom selectors. Adding a way to opt out of or into using the prefix will make it possible to workaround the problem.

This issue referenced in #3276

@CarterLi
Copy link

CarterLi commented May 4, 2017

This flag should be able to be configured globally 👍

@christopherthielen
Copy link
Contributor

This will be fixed by 60b9ef9 in 1.0.1
We will only prefixing if the component name requires the prefix (it is named xFoo or dataFoo)

@jordandh
Copy link
Author

jordandh commented May 4, 2017

Thanks for the quick turnaround @christopherthielen. I tried 1.0.1 and the element names are indeed without the 'x-' prefix again. However, the attribute names are still being prefixed with 'x-'. Would it be possible to only add the prefix to the attributes when the component name requires it as well?

@christopherthielen
Copy link
Contributor

@jordandh yeah I suppose that would make sense

@christopherthielen christopherthielen added this to the 1.0.2 milestone May 4, 2017
@Remco75
Copy link

Remco75 commented May 5, 2017

Ha, I ran into this as well: when will 1.0.1 be available through npm? I do component styling based on component names and this breaks a lot ;-)

@christopherthielen
Copy link
Contributor

@Remco75 1.0.1 was released last week. Note the npm package changed to scoped package @uirouter/angularjs #3424

Read more: https://ui-router.github.io/blog/uirouter-scoped-packages/

@Remco75
Copy link

Remco75 commented May 8, 2017

thnx man, great work as usual. I think npm registry cache got the better of me, it wasn't there yet when I checked ;-)

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

No branches or pull requests

4 participants