From the course: Learning Polymer

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Create an element

Create an element - Polymer Tutorial

From the course: Learning Polymer

Create an element

- [Narrator] Let's start by using the Polymer CLI tools to create a polymer element scaffold. So in the terminal window, make sure that you're in the 04_02 start directory, so I need to go in there. All right. And, once you're in there, type polymer init. This will start the Polymer CLI and will present a menu of options. And you can see that there are options for creating a polymer element, a polymer application using the starter kit, and creating the shop demo app. So I'm going to choose the polymer 2 element option. So the tool will then ask me to provide some basic information, starting with what I want my new element to be called. So I'm going to give it the name test element, and I'll hit enter. And you can see that the tool is letting me know that custom elements need to have a hyphen in their name. So I'll fix that. I'll type test-element. All right, and hit enter. And now I need to enter a brief, basic description, which I'll just add here and say this is a test element for…

Contents