ngUpgraders / ng-forward

The default solution for those that want to write Angular 2.x style code in Angular 1.x
410 stars 36 forks source link

Component Class Reuse #145

Closed Mattchewone closed 8 years ago

Mattchewone commented 8 years ago

Hi,

I have two components which do the exact same thing but they have two different views, is there a way to re-use the same component class across two different templates?

I have currently created a class on its own and then within both the component declarations I have extended the core class, was not sure if this was the best way to make reuse of one core class definition.

Thanks Matt

timkindberg commented 8 years ago

I think the extending solution is going to be your best bet.