Using a Directive to Modify the Behaviour of an Ionic Component

By Josh Morony

Ionic provides a lot of useful components right out of the box, but sometimes they might not do exactly what you want them to do. In situations like this, you mostly have two options: build a new component that does what you want, or create a directive to modify the behaviour of the existing component.

The difference between a component and a directive can be a little hard to understand, but the basic idea is that you would create a custom component to create some new element in your application and you would create a directive to change the behaviour of some existing component. A directive is basically a component without a template.

If you were creating your own entirely new custom component, you would use it like this:

Read the full article...

Share on Google Plus

About www.

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment


Post a Comment