Best way to work with non-ionic components


#1

I asked a question regarding the best way for onClick binding to non-ionic components on StackOverflow, but then realized that I should better address the ionic community specifically. I would appreciate, if someone would take a brief look at the question.

https://stackoverflow.com/questions/47675669/ionic-3-app-best-way-to-work-with-non-ionic-html-components


#2

Hello,

maybe I’m completley wrong. So sorry in front of my worse explaination.

your example.

<button ion-button (click)="logEvent(this)"> Button</button>

is a html button. the ionic guys created a directive ion-button that do somethings with this button. (click) will evaluated by angular.

In the answer from sampath it will show you the usage of a rating component. This component itselfs contain html elements.

You can create your own component, based on html elements or other components and use it in ionic.

Look for a good tutorial that shows you, how to create a component, about @Inputs, outputs, viewchild, etc. and also you can use (click) on any html element.

Sorry for that bad description, but best way is looking for a tutorial creating components.

Best regards, anna-liebt