-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support base-href option #63
Comments
I guess |
Well, if you don't provide |
I'm facing that problem too. OK, after i wrote that i read @yowari comment once again and i'll try that way. Thanks =) |
Seems that MonacoEditorModule.forRoot({baseUrl: "./assets"}) |
this doesn't work for me |
This worked perfectly for me. It should be quoted in the Readme.md in my opinion |
It's doesn't work for me too |
it works fine for me, even with remote URL: MonacoEditorModule.forRoot({
baseUrl: 'http://localhost:53015/assets'
}) |
ngx-monaco-editor does not take into account base-href option when building Angular app. For now, we have to configure baseUrl when importing the module. I think the component should be able to get the baseHref and use it as default path. Meaning, we should perhaps have by default
${baseHref}/assets
instead of/assets
.ngx-monaco-editor/src/platform/editor/base-editor.ts
Line 40 in 2ffca32
To do so, we first have to inject the baseHref, which is not a simple thing to do 😛 (at least elegantly). My idea is to first extract a service from the BaseEditor class and then manage to inject the baseHref. What do you think?
ps: For instance, I use a hacky way to do this behaviour without altering the code in my project https://github.com/yowari/code-challenger/blob/master/src/app/shared/shared.module.ts
btw: first time trying to contribute to a GitHub project so please be kind 😊
The text was updated successfully, but these errors were encountered: