0
How can I take the value of the data set attribute or change it in the link with the following structure:
<a href='#' data-set='22'>Texto</a>
I know that in jquery I can use:
$('a').Attr('conjunto de dados');
And to change its content:
$('a').Attr('conjunto de dados', '01');
But in Ionic4 I’m not succeeding, I’ve already researched and I can’t exactly that.
Can someone help me?
But you’re using Ionic with what? Pure Javascript, Angular, React, Vue??
– LeAndrade
I’m using with Angular
– José Dam
And what you know of Angular?
– LeAndrade
I’m starting in ionic4 with angular. But I already know enough things. You can help?
– José Dam
So Jose, you can take the value of the attribute
href
or any other value of any other attribute with normal pure Javascript or with Angular even with a @Viewchild for example.– LeAndrade
Thank you very much for contributing. In this case how can I take or change the href attribute with the use of @Viewchild for example?
– José Dam