Move js from index to app.js