Hello there,
I’m very new in using Atom, and therefore I have a very easy question…
I have a html file with a javascript (VUE) in that reads a json file which is “hardcoded” in the html file itself,
Like this …
<script type="text/javascript">
var App = new Vue({
el: '#app',
data:
{
"records": [
{
"id": "A45",
"fields": ........
…
…
lots of records follow here
…
and ending with
This is working fine, so there is nothing wrong with the javascript as such, but of course, I don’t like the raw data json file to be “hardcoded” in my html file.
Instead I would like to reference it, so I can using the same html file, with only changing the name of the json file. So I’m looking for a syntax something like (assuming rawdata.json is the name of the json data file that contains all the records and resides in the same directory of the html file)
%include rawdata.json. ??
or maybe
#incorporate rawdata.json ??
or … ???
IS this possible en how do I reference it ?
Thanks, any help appreciated.