{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/Discussion/issues/413","labels_url":"https://api.github.com/repos/vuejs/Discussion/issues/413/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/Discussion/issues/413/comments","events_url":"https://api.github.com/repos/vuejs/Discussion/issues/413/events","html_url":"https://github.com/vuejs/Discussion/issues/413","id":107529464,"number":413,"title":"How to structure a project with multiple view models?","user":{"login":"matteocontrini","id":2164763,"avatar_url":"https://avatars.githubusercontent.com/u/2164763?v=3","gravatar_id":"","url":"https://api.github.com/users/matteocontrini","html_url":"https://github.com/matteocontrini","followers_url":"https://api.github.com/users/matteocontrini/followers","following_url":"https://api.github.com/users/matteocontrini/following{/other_user}","gists_url":"https://api.github.com/users/matteocontrini/gists{/gist_id}","starred_url":"https://api.github.com/users/matteocontrini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matteocontrini/subscriptions","organizations_url":"https://api.github.com/users/matteocontrini/orgs","repos_url":"https://api.github.com/users/matteocontrini/repos","events_url":"https://api.github.com/users/matteocontrini/events{/privacy}","received_events_url":"https://api.github.com/users/matteocontrini/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-21T14:49:54Z","updated_at":"2015-09-21T18:13:16Z","closed_at":null,"body":"Hello,\r\nsay I have an application with 5 pages (= 5 actual html files). Every page shows different things, so every page should have its corresponding ViewModel (= Vue instance).\r\n\r\nHow should I structure the files of my project? Should every VM have its own file and then every page will reference the appropriate one? Or should I bundle all the Vue definitions in a single file and then Vue itself will decide if the `el` option actually exists?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/vuejs/Discussion/issues/comments/142064798","html_url":"https://github.com/vuejs/Discussion/issues/413#issuecomment-142064798","issue_url":"https://api.github.com/repos/vuejs/Discussion/issues/413","id":142064798,"user":{"login":"mark-hahn","id":811455,"avatar_url":"https://avatars.githubusercontent.com/u/811455?v=3","gravatar_id":"","url":"https://api.github.com/users/mark-hahn","html_url":"https://github.com/mark-hahn","followers_url":"https://api.github.com/users/mark-hahn/followers","following_url":"https://api.github.com/users/mark-hahn/following{/other_user}","gists_url":"https://api.github.com/users/mark-hahn/gists{/gist_id}","starred_url":"https://api.github.com/users/mark-hahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mark-hahn/subscriptions","organizations_url":"https://api.github.com/users/mark-hahn/orgs","repos_url":"https://api.github.com/users/mark-hahn/repos","events_url":"https://api.github.com/users/mark-hahn/events{/privacy}","received_events_url":"https://api.github.com/users/mark-hahn/received_events","type":"User","site_admin":false},"created_at":"2015-09-21T18:13:16Z","updated_at":"2015-09-21T18:13:16Z","body":"> Should every VM have its own file\n\nIMHO, yes.\n\nOn Mon, Sep 21, 2015 at 7:49 AM, Matteo Contrini <notifications@github.com>\nwrote:\n\n> Hello,\n> say I have an application with 5 pages (= 5 actual html files). Every page\n> shows different things, so every page should have its corresponding\n> ViewModel (= Vue instance).\n>\n> How should I structure the files of my project? Should every VM have its\n> own file and then every page will reference the appropriate one? Or should\n> I bundle all the Vue definitions in a single file and then Vue itself will\n> decide if the el option actually exists.\n>\n> Thanks\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/vuejs/Discussion/issues/413>.\n>\n"}}