A
A
Alexander Florinsky2014-11-07 16:38:13
Angular
Alexander Florinsky, 2014-11-07 16:38:13

Why is Thrift not working in Angular.js?

Good afternoon.
I am writing a client for a server.
Communication with the server occurs through Thrift.
If I send a request to the server simply in the index page code, then everything is fine. The answer comes.

var transport = new Thrift.Transport("Path_To_Server");
     var protocol = new Thrift.Protocol(transport);
     return new SomeMethod(protocol);

As soon as I insert the same code into the controller from Angular.js, the following error appears in the console.
Error: Thrift.Transport is not a
constructor The same thing if you make a connection through the factory.
Maybe someone knows how to do it right?
PS - There are no errors in other scripts.
PS - The answer was covered in an error on the server. Or rather, the old trift file (

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question