Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4226 Lượt xem

Hi everyone, is there a way to use an external javascript in my website? I'm trying to use model-viewer but if I copy the script to a local folder and extend website.assets_frontend it shows an error in the console.

Version: Odoo 14

Uncaught SyntaxError: Unexpected token 'export'


For reference:
https://modelviewer.dev/

Thanks
Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Adding the script to other view different from website.assets_frontend do the trick, in my case I extend the footer with the script tag.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 12 22
6066
0
thg 3 15
4580
0
thg 12 24
1148
0
thg 11 24
1356
0
thg 1 24
7096