August 2019
Intermediate to advanced
158 pages
3h 13m
English
Unlike vanilla Web Components, Polymer is a library that needs to be installed. But before we even have the library installed, we will be needing Polymer's Command Line Interface (CLI) that come with its own server and testing framework. We can install it using the following command:
npm install -g Polymer-cli
And, once installed, you can check if it is installed by using the following command:
Polymer --version
Now that Polymer is installed, let's try to create a <hello-world> component using this library. Let's create a folder called HelloWorld and then create a file called index.html. The contents of this file can be very basic, like the following:
<!DOCTYPE html><html lang="en" dir="ltr"> <head> <meta charset="utf-8"> ...
Read now
Unlock full access