Closed
Description
protobuf.js version: <6.8.6>
Hello, I'm trying to integrate Protobuf.js in my Angular 4 project. I'm following the example on the Github page and generated my .proto file. I'm stuck on trying to load my proto file which is in the same folder as my .ts file. I also tried #797 but the result is the same.
Here's a small snippet of what I'm trying to do.
import { Injectable } from '@angular/core';
import * as protobuf from 'protobufjs';
@Injectable()
export class ProtobufService {
constructor() {
protobuf.configure();
}
start() {
protobuf.load('./awesome.proto', function(err, root) {
}
}
And the result I get. I tried including the relative and absolute paths and no success.
GET http://localhost:4200/awesome.proto 404 (Not Found)
ERROR Error: status 404
at XMLHttpRequest.fetchOnReadyStateChange [as __zone_symbol__ON_PROPERTYreadystatechange] (index.js:90)
Any idea ?
Metadata
Metadata
Assignees
Labels
No labels