From the course: Learning Polymer

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

One-way binding

One-way binding - Polymer Tutorial

From the course: Learning Polymer

Start my 1-month free trial

One-way binding

- Before we get started coding our example, I'm going to run the finished version so we can see what to expect. Here in the terminal, I've got to make sure I'm in the exercise files folder, and I am. I'll type polymer serve and then dash, dash open, and then dash, dash open path is going to be zero five, zero two, finished slash index dot html. I'll let that load in the browser. You can see that this is a simple example where I have a few different buttons, and a single line of text output that's showing a temperature reading, and as I click each button, you can see that the temperature is changing, right? So, pretty simple, right? Let's go look at the code for this. Here in the editor what I am going to do is in the zero five zero two start folder, let's start off by opening the index dot html file. Down here in the markup, you can see that I've got a component named temperature card which is displaying the temperature data, and there's three buttons, each of which are calling this…

Contents