### File

`src/app/shared/components/inheritance.ts`

### Index

###### Properties

- Abstract myProp

###### Methods

- Abstract myMethod

### Constructor

`constructor()`
Defined in src/app/shared/components/inheritance.ts:5

### Methods

Abstract myMethod
`myMethod()`
Defined in src/app/shared/components/inheritance.ts:9
Returns : `string`

### Properties

Abstract myProp
Type : `string`
Defined in src/app/shared/components/inheritance.ts:5

    import { Component, Input } from '@angular/core';

    @Component({ template: '' })
    export abstract class MotherComponent {
        abstract myProp: string;

        constructor() {}

        abstract myMethod(): string;
    }

    @Component({ template: '' })
    export class SonComponent extends MotherComponent {
        myProp: string;

        constructor() {
            super();
        }

        myMethod(): string {
            return 'Implementation A';
        }
    }

    @Component({ template: '' })
    export class GrandsonComponent extends SonComponent {
        constructor() {
            super();
        }

        myMethod(): string {
            return 'Implementation B';
        }
    }

Legend
Html element
Component
Html element with directive

# results matching ""

# No results matching ""