Skip to content

Setting level for md-header does not work #45

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
Arxero opened this issue Jul 21, 2021 · 7 comments
Closed

Setting level for md-header does not work #45

Arxero opened this issue Jul 21, 2021 · 7 comments

Comments

@Arxero
Copy link

Arxero commented Jul 21, 2021

Hello I am looking at this line

const level = parseInt(this.getAttribute('level') || '3', 10)

and
const prefix = `${'#'.repeat(level)} `

and I do it like that in my code

<md-header [attr.level]="1"><gw-toolbar-button [button]="btnType.Header"></gw-toolbar-button></md-header>

but it still gives me 3 signs of # like ### is there some bug or I am doing it wrong? Thank you!

@keithamus
Copy link
Contributor

Hey @Arxero thanks for the issue.

What is the [attr.level] syntax? Does this map to an html attribute? In raw html this should be <md-header level="1">

@Arxero
Copy link
Author

Arxero commented Sep 15, 2021

Yes it does and yet it does not work as expected.
Screenshot_51

@keithamus
Copy link
Contributor

I would advise you using the Chrome inspector to set a break point inside the code; you may be able to figure out why it is not getting the attribute. I'm not sure I would be able to help without seeing the page or a reduced scope reproduction.

@koddsson
Copy link
Contributor

koddsson commented Jan 4, 2022

Looks like a duplicate of #40? Is this an angular project @Arxero?

@Arxero
Copy link
Author

Arxero commented Jan 4, 2022

Yes, it is an angular project, and not sure if it is duplicate altho seems like, but tell me if it gets fixed will update and verify and close the issue myself.

@gmaggiodev
Copy link

gmaggiodev commented Apr 5, 2022

Hi @koddsson,
when is planned to be relased on npm?
Thanks

@koddsson
Copy link
Contributor

koddsson commented Apr 5, 2022

v2.1.1 is out now. Please re-open this issue if the issue persists.

@koddsson koddsson closed this as completed Apr 5, 2022
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