Hi there, I was trying to import a provider into another but I got this error I can’t really say what could be the cause. Below is my code.
In my ChatProvider class
import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';
import { SocketProvider } from "../socket/socket";
import { DataProvider } from "../data/data";
@Injectable()
export class ChatProvider {
constructor(
public http: Http,
private socket: SocketProvider, // When I comment out this line I don't get the error
public data: DataProvider
) {
}
sendMessage(msg){
this.socket.sendMessage(msg, (data) => {
}
}
}
I have import this same SocketProvider in other page and didn’t get error.