Reusing code in all templates


I have got this HTML code for displaying notifications. That should be used in every view. But i’m unsure on how I would do something like that in Ionic.

 <div class="notification">
        <img src="{{ notification?.image }}">
        <span>{{ notification?.title }}</span>
        {{ notification?.content }}

Can anyone point me in the right direction?


Create a component. Then you can reuse the code/component in all your pages/views.