I'm working on a DSL developed using xtext. I am using autocomplete using orion editor. It works great with the auto generated web editor. But, we want to integrate it with another web app developed using Angular 4. I got to configure the editor, but somehow all calls to language services (e.g. Occurrences, hover, etc) fails with 404
. While same calls work fine with the auto generated embedded editor. What I'm missing here?
Here is how my code to create editor looks like in typescript:
xtext.createEditor({
'serviceUrl': 'http://localhost:8080/xtext-service',
'syntaxDefinition': 'http://localhost:8080/xtext-resources/generated/dsl-syntax.js',
'parentClass': 'xtext-editor',
'enableCors': true,
'loadFromServer': false
})
If I compare AJAX calls made by angular app and web editor, significant difference I see is, the web editor sends few cookies, which angular app doesn't. Can that be a reason? If so, how can I fix angular app accordingly?