What is the best way to load an external html file


#1

Hello,
I am trying to load an external html file in a template into my Meteor app.
I found out this package:

But it didn’t work,
and I don’t think this is being developed any more.
So, What is the best way to load an external html file in a meteor template?
thanks in advance!


#2

You can have a template with an helper that returns HTML, then feed your file to the helper.


#3

Thank you so much,
but the html file is outside the domain path.
how can I open and read the contents with the helper?


#4

you need to use an HTTP request, retrieve the html, format it (remove head and body tag, plus any other useless tag) and then serve it.