handle inheritance in angular classes