Son1Q Posted January 12, 2020 Share Posted January 12, 2020 I downloaded npm package 'ragemp-c', but when i try call functions from 'mp' object i received error 'ERROR ReferenceError: mp is not defined'. import { Component } from '@angular/core'; declare var mp: any; @Component({ selector: 'app-counter-component', templateUrl: './counter.component.html' }) export class CounterComponent { public currentCount = 0; public incrementCounter() { this.currentCount++; console.log(mp); mp.trigger('test'); } } What could be the problem? Link to comment Share on other sites More sharing options...
Son1Q Posted January 13, 2020 Author Share Posted January 13, 2020 (edited) Solved. Topic can be closed. Edited January 13, 2020 by Son1Q Link to comment Share on other sites More sharing options...
Beefo Posted January 30, 2020 Share Posted January 30, 2020 could you maybe say what the problem was? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now