tur-nr / polymer-redux

Polymer bindings for Redux.
https://tur-nr.github.io/polymer-redux
MIT License
440 stars 67 forks source link

Trouble running polymer-redux 2 demo #78

Closed JoeCodeswell closed 7 years ago

JoeCodeswell commented 7 years ago

Hi Christopher,

I am pretty new to both polymer & redux. I am trying to get the polymer-redux 2 demo running. In trying to follow the README.md, I have:

unziped https://github.com/tur-nr/polymer-redux/tree/polymer-2 TO .../UsePRdx_Pcast61Pj/polymer-redux-polymer-2

$ cd .../UsePRdx_Pcast61Pj/polymer-redux-polymer-2
$ bower install --save polymer-redux#polymer-2
$ cd demo
$ polymer serve
info:    Files in this directory are available under the following URLs
      applications: http://127.0.0.1:8081
     reusable components: http://127.0.0.1:8081/components/demo/

Browsing in chrome to http://127.0.0.1:8081/ yields a blank screen.

I notice that demo/index.html references ../../webcomponentsjs/webcomponents-lite.js

The above steps did not produce this reference for me. What am I missing?

Thanks for the help.

Love and peace,

Joe

tur-nr commented 7 years ago

You should go to: http://localhost:8081/components/polymer-redux/demo/index.html

The landing page for polymer-2 branch isn't complete due to some components from PolymerElements being a little unstable during development. I will revise this again once these components are stable with Polymer 2.

JoeCodeswell commented 7 years ago

Hi Christopher,

Thanks for the response. I just tried your suggestion. In Chrome i browsed to: "http://localhost:8081/components/polymer-redux/demo/index.html". The page is still blank.

Here's the source of the page according to Chrome:

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">

    <title>polymer-redux Demo</title>

    <script src="../../webcomponentsjs/webcomponents-lite.js"></script>

    <link rel="import" href="./message-mixin.html">
</head>
<body>
    <dom-module id="my-element">
        <template>
            <p>[[message]]</p>
            <button on-click="handleUpdateMessage">Update message</button>
        </template>
        <script>
            class MyElement extends MessageMixin(Polymer.Element) {
                static get is() { return 'my-element'; }

                handleUpdateMessage() {
                    this.dispatch('updateMessage', 'Nothing changes by staying the same, quite literally.');
                }
            }
            window.customElements.define(MyElement.is, MyElement);
        </script>
    </dom-module>
    <my-element></my-element>
</body>
</html>

Thanks. Love and peace, Joe

tur-nr commented 7 years ago

There are no warnings in your terminal? Also Chrome's console?

I've tried a fresh checkout (npm install && bower install), polymer serve. Everything works accordingly.