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

Don't work with Angular 2 template syntax #116

Open
desaroger opened this issue Dec 14, 2016 · 6 comments
Open

Don't work with Angular 2 template syntax #116

desaroger opened this issue Dec 14, 2016 · 6 comments
Assignees

Comments

@desaroger
Copy link

Angular 2 makes use of case-sensitive attributes.

For this test I have this html:

<nav>
      <span>
        <a [routerLink]=" ['./'] ">
          Index
        </a>
      </span>
</nav>

If I run:

$ html2hade test.html --bodyless

I get:

nav
  span
    a([routerlink]=" ['./'] ")
      | Index

As you can see, now the attribute routerLink is in lowercase, routerlink, and doesn't work anymore with Angular.

I tried with -s and --donotencode, same results.

@donpark
Copy link
Owner

donpark commented Dec 15, 2016

This is related to #102 and share root cause: DOM parser used (jsdom) either did not or does not preserve case.

@desaroger
Copy link
Author

Hi @donpark, oh I see jsdom-little isn't updated from 2 years :/

Do you have any plan to solve this? Changing the DOM parser or something like this? Oh and sorry for duplicate issues, I made a search but didn't found that one.

@donpark
Copy link
Owner

donpark commented Dec 21, 2016

@desaroger well, this issue calls for a major change which will very likely disturb existing users so I think it's best to fork.

@aichholzer any plan to address this issue?

@aichholzer
Copy link
Collaborator

@desaroger a complete re-write is on the way. I will revisit this issue when I get there. Thank you for reporting it.

@aichholzer aichholzer self-assigned this Feb 16, 2017
@rmckeel
Copy link

rmckeel commented Apr 26, 2017

@aichholzer Thanks, happy to see a resolution for this issue as I use html2jade all the time, and just now getting into Angular2 with case-sensitive dom elements. Thanks!

@rsxdalv
Copy link

rsxdalv commented May 24, 2017

Same with ngModel

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

No branches or pull requests

5 participants