Documentation ion-card


#1

Hello,
I played a little with ion-cards.
I’ve got

<ion-card>
    <ion-card-content (click)=do($event)">
    <p>Read the correct doc.</p>
  </ion-card-content>
</ion-card>

I found no doc how to get the content of ion-card. So I looked in console.log($event) in chrome.

I found in this case different ways accessing p.textContent, for example path[0]. And also ways failing to access p.textContent.

Is there any documentation of the $event output and what it is or maybe direct documentation to ion cards ?

Best regards, anna


#2

Why exactly do you want to access the content of a card?


#3

Hello,
excatly? Hmm, I will code for android devices. So I am completly new to android and the complete web stuff. So I test ionic (and maybe later xamarin) I have some scenarios and ui things in mind and make basic, really basic examples for this things.

So the ion-card looks good for structuring my page content, but if I will use it in this case it is nessecary than I get access to the content an manipulate it by code.

Docs (if I am able to read the right one) could help me to unterstand some things and is a much more faster way then try and error.

Best regards, anna


#4

Why exactly?

I think you are doing something much more complicated than needed…

If you just want to be able to update the content of the card, put the content in a variable and use that variable in the html so they are bound together. Then you can just update the variable and the UI will update as well.


#5

I don’t intend this to sound harsh, but if that’s really necessary then I think you need to reconsider the app design. Let Angular handle the DOM for you and you will be much happier in the long run.