Answer the question
In order to leave comments, you need to log in
How to initialize Angular service, custom class from component?
I am using Angular Elements
In my application I have a loadable component as a MapComponent. There is also a MapCore base class that contains all the domain logic:
class MapCore {
constructor (props: Props) {
// Конфиг здесь
}
}
@Component({
селектор: 'map',
templateUrl: './map.component.html',
styleUrls: ['./map.component.scss']
})
export class MapComponent {
@Input () props: Props;
@Input () center: Center;
ngOnInit () {
this.map = MapCore (this.props);
}
}
<map-root center = "56,90" props = "props">
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question