Good afternoon, I have the following problem with a function typescript
[ts] Property 'notificaciones' does not exist on type 'typeof Alertas'.
I need to use the function called message in a component but when I set the function as public static I get that message, while if I remove the static does not send that error.
the code is as follows
import { NotificationService } from "../shared/utils/notification.service";
export class Alertas {
constructor(private notificaciones:NotificationService) { }
public static mensaje() {
this.notificaciones.smallBox({
title: "Sistema Minutas",
content: "Los datos se guardaron correctamente",
color: "#739E73",
timeout: 4000,
iconSmall: "fa fa-check",
});
}
}
notifications.service this is the code of my service
import {Injectable} from '@angular/core';
declare var $: any;
@Injectable()
export class NotificationService {
constructor() {
}
smallBox(data, cb?) {
$.smallBox(data, cb)
}
bigBox(data, cb?) {
$.bigBox(data, cb)
}
smartMessageBox(data, cb?) {
$.SmartMessageBox(data, cb)
}
}