Making the cdn links work in angular?

Hi, I recently tried to do babylonjs again but how do i use the cdn effectively in angular,
For example the idea is to import the cdns i need into the index.html file…
later in a component i need to declar var babylon, but how do i declare var babylon gui?
whhat is the correct way if i want to use latest preview links i get ton of errors just tryin
but i want to try running only with cdn links any help|?

Hey!
Why not using npm for that? It would be far easier for you to use babylon.js that way in your angular app.

Doc worth reading: How to use BabylonJS in an Ionic Angular app - Babylon.js Documentation

deltakosh i dont know i dont know… i will check your link but i dont have any high hopes anymore…
so many bugs in manual

What do you mean?

yes its just 2 days I had to back to 3.3.0 again and have cannon on cdn its very complex…
if i upgrade and it start to complain about everything, i imagine its not really written for angular 6 so its struggle to have best version at all times! but i do my best =)

It works with no problem with angular 6. Multiple users are already using it. If we could know in detail your issues we may be able to help

yes deltakosh i know its possible for sure but, in my case its just that angular refuse to build cause its errors in source code a lot of times and versions trying to find error-free version is hard, its nothing wrong with the code but angular make remarks of everything sometimes like different types and generics need to be the same, and the other problem I had was angular serverside rendering, A lot of Babylon need to be rendered only in browser I assume so its that too I marked your answer as the solution since obvious no answer really =)

1 Like