user8401765
user8401765

Reputation:

Importing a component class with another name

For example, I have a class with static functions having the name:

SennenGoroshiNoJutsuComponent

I want to import this class into another component and have to use its properties a decent amount of time. So i wanted to rename it as sg. Do we have something of the sort of

import { SennenGoroshiNoJutsuComponent } as sg from '../sennen-goroshi-no-jutsu.component';

with which I could import it?

Upvotes: 2

Views: 87

Answers (1)

SiddAjmera
SiddAjmera

Reputation: 39462

You can do it like this:

import { SennenGoroshiNoJutsuComponent as sg } from '../sennen-goroshi-no-jutsu.component';

Have a look at Modules (Imports section) for more info.

Upvotes: 2

Related Questions