|
244 | 244 | import 'prismjs'
|
245 | 245 | import 'prismjs/components/prism-python.js'
|
246 | 246 | import sidebar from '../components/Sidebar'
|
247 |
| -import musicpkg from '/home/n0rthw1nd/magisInfo/Progettazione/directories/backend/sounds/notes/music_package.json' |
248 |
| -var data = JSON.parse(musicpkg); |
249 |
| -
|
250 |
| -var instrumentlist = []; |
251 |
| -
|
252 |
| -for (p in data) { |
253 |
| - var pkg = data['packages'][p]; // cat |
254 |
| - var names = [pkg['name_IT'] , pkg['name_EN']]; |
255 |
| - instrumentlist[instrumentlist.length] = names; |
256 |
| -
|
257 |
| -} |
| 247 | +import musicpkg from '/home/n0rthw1nd/magisInfo/Progettazione/directories/vue-app/sounds/notes/music_package.json' |
| 248 | +
|
| 249 | +var prova = '{"userName": "Jaydeep Gondaliya"}' ; |
| 250 | +//var data = JSON.parse(musicpkg); |
| 251 | +
|
| 252 | +
|
| 253 | +new Vue ({ |
| 254 | + el: '#liveapp', |
| 255 | + data: { |
| 256 | + json: null |
| 257 | + }, |
| 258 | + created: function () { |
| 259 | + fetch("/home/n0rthw1nd/magisInfo/Progettazione/directories/vue-app/sounds/notes/music_package.json") |
| 260 | + .then(r => r.json()) |
| 261 | + .then(json => { |
| 262 | + this.json=json; |
| 263 | + }); |
| 264 | + }, |
| 265 | +}); |
| 266 | +//var instrumentlist = []; |
| 267 | +
|
| 268 | +
|
| 269 | +//new Vue jsondata: { |
| 270 | +
|
| 271 | +//} |
| 272 | +//new Vue ({ |
| 273 | +// el: '#liveapp', |
| 274 | +// data: { |
| 275 | + // json: musicpkg |
| 276 | +// }, |
| 277 | +// created: function () { |
| 278 | + // fetch("/data.json") |
| 279 | + // .then(r => r.json()) |
| 280 | + // .then(json => { |
| 281 | + // this.json=json; |
| 282 | + // }); |
| 283 | +// } |
| 284 | + // methods: { |
| 285 | +// readFromJson(input) { |
| 286 | +// console.log("inside readfromjson") |
| 287 | +// var json = JSON.parse(input) |
| 288 | +// console.log("parsed city.value is: " + json.city.value) |
| 289 | +// this.parsedJson = json |
| 290 | + // } |
| 291 | +//}); |
| 292 | +
|
| 293 | +//for (p in data) { |
| 294 | +// var pkg = data['packages'][p]; // cat |
| 295 | +// var names = [pkg['name_IT'] , pkg['name_EN']]; |
| 296 | + // instrumentlist[instrumentlist.length] = names; |
| 297 | +
|
| 298 | +//} |
258 | 299 | var instrumentlist = [["piano","piano"], ["chitarra","guitar"], ["flauto","flute"]];
|
259 | 300 |
|
260 | 301 | export default {
|
|
0 commit comments