{"action":"created","issue":{"url":"https://api.github.com/repos/roguePanda/aurelia-polymer/issues/18","repository_url":"https://api.github.com/repos/roguePanda/aurelia-polymer","labels_url":"https://api.github.com/repos/roguePanda/aurelia-polymer/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/roguePanda/aurelia-polymer/issues/18/comments","events_url":"https://api.github.com/repos/roguePanda/aurelia-polymer/issues/18/events","html_url":"https://github.com/roguePanda/aurelia-polymer/issues/18","id":161838598,"number":18,"title":"Two-way binding does not work with Polymer and Webpack.","user":{"login":"HIRANO-Satoshi","id":1736529,"avatar_url":"https://avatars.githubusercontent.com/u/1736529?v=3","gravatar_id":"","url":"https://api.github.com/users/HIRANO-Satoshi","html_url":"https://github.com/HIRANO-Satoshi","followers_url":"https://api.github.com/users/HIRANO-Satoshi/followers","following_url":"https://api.github.com/users/HIRANO-Satoshi/following{/other_user}","gists_url":"https://api.github.com/users/HIRANO-Satoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/HIRANO-Satoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HIRANO-Satoshi/subscriptions","organizations_url":"https://api.github.com/users/HIRANO-Satoshi/orgs","repos_url":"https://api.github.com/users/HIRANO-Satoshi/repos","events_url":"https://api.github.com/users/HIRANO-Satoshi/events{/privacy}","received_events_url":"https://api.github.com/users/HIRANO-Satoshi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-06-23T04:38:30Z","updated_at":"2016-07-15T08:58:02Z","closed_at":null,"body":"@roguePanda, thank you for the great plugin.\r\n\r\nTwo-way binding does not work with Webpack. The following code acts like one-way binding.\r\n\r\n```\r\n    <paper-input value.two-way=\"firstName\"></paper-input>\r\n```\r\n\r\nWhen we use Polymer with webpack, we have to use  [aurelia-webpack-plugin](https://github.com/aurelia/webpack-plugin) which is a template loader for webpack. We don't use aurelia-html-import-template-loader.\r\n\r\nIn that case the following code produces an error.\r\n\r\n```\r\n<link rel=\"import\" href=\"/bower_components/paper-input/paper-input.html\">\r\n<template>\r\n```\r\n\r\n```\r\nUnhandled rejection Error: Template markup must be wrapped in a <template> element e.g. <template> <!-- markup here --> </template>\r\n```\r\n\r\nWe needed to place all *link* tags inside the *template* tag.  @EisenbergEffect wrote that [I'm not sure how it worked with jspm. There's a strict guard in the codebase to ensure that html is wrapped with a template.](https://github.com/aurelia/webpack-plugin/issues/40).\r\n\r\n```\r\n<template>\r\n<link rel=\"import\" href=\"/bower_components/paper-input/paper-input.html\">\r\n```\r\n\r\nCould you fix code for bindings?\r\n\r\nThere is a quick workaround. As I put all loadings of the *paper-input* and tags requiring two-way binding in index.html, the two-way binding works.\r\n\r\n```\r\n    <script src=\"bower_components/webcomponentsjs/webcomponents-lite.js\"></script>\r\n    <link rel=\"import\" href=\"bower_components/polymer/polymer.html\">\r\n    <link rel=\"import\" href=\"/bower_components/paper-input/paper-input.html\">\r\n```\r\n\r\nHere is an example: [skeleton-navigation/skeleton-webpack](https://github.com/HIRANO-Satoshi/skeleton-navigation/tree/master/skeleton-webpack)."},"comment":{"url":"https://api.github.com/repos/roguePanda/aurelia-polymer/issues/comments/232898868","html_url":"https://github.com/roguePanda/aurelia-polymer/issues/18#issuecomment-232898868","issue_url":"https://api.github.com/repos/roguePanda/aurelia-polymer/issues/18","id":232898868,"user":{"login":"dpinart","id":4228069,"avatar_url":"https://avatars.githubusercontent.com/u/4228069?v=3","gravatar_id":"","url":"https://api.github.com/users/dpinart","html_url":"https://github.com/dpinart","followers_url":"https://api.github.com/users/dpinart/followers","following_url":"https://api.github.com/users/dpinart/following{/other_user}","gists_url":"https://api.github.com/users/dpinart/gists{/gist_id}","starred_url":"https://api.github.com/users/dpinart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpinart/subscriptions","organizations_url":"https://api.github.com/users/dpinart/orgs","repos_url":"https://api.github.com/users/dpinart/repos","events_url":"https://api.github.com/users/dpinart/events{/privacy}","received_events_url":"https://api.github.com/users/dpinart/received_events","type":"User","site_admin":false},"created_at":"2016-07-15T08:58:02Z","updated_at":"2016-07-15T08:58:02Z","body":"Hi\r\n\r\nWe're using polymer and webpackand it's working quite fine. The difference is that we're vulcanizing all required polymer widgets in a single bundle (polymer.html) that is firstly added in index.html, just after the import of webcomponentsjs. This way, we don't need to add any link in aurelia templates as all of them are already loaded by the bundle"}}
{"actor":{"display_login":"dpinart"}}