How to use reusable code

hai!
iam new to ionic and i want to reuse the code of the component where i want in application how can i do it

You make a provider.