Polymer - Paper Progress
The progress bars are used to determine the percentage of task completed. It gives a brief idea to the user about how much time will be required to complete the task. Secondary progress is also available for displaying intermediate progress. To get paper-progress in your directory in working condition, you should run the following command in the command prompt.
bower install --save PolymerElements/paper-progress
Example
Your index.html file should look like the following −
<!doctype html>
<html>
<head>
<link rel = 'import' href = 'my-app.html'>
</head>
<body>
<my-app></my-app>
</body>
</html>
Your my-app.html file should look like the following −
<link rel = 'import' href = 'bower_components/polymer/polymer.html'>
<link rel = "import" href = "bower_components/paper-progress/paper-progress.html">
<dom-module id = 'my-app'>
<template>
<style>
paper-progress {
display: block;
width: 30%;
margin: 20px 0;
}
</style>
<h3>Paper-Progress Example</h3>
<p>70% completed</p>
<paper-progress value = "70"></paper-progress>
<p>45% completed</p>
<paper-progress value = "45"></paper-progress>
<p>20% completed</p>
<paper-progress value = "20"></paper-progress>
</template>
<script>
Polymer ({
is: 'my-app', ready: function() {
this.async(function() {
});
}
});
</script>
</dom-module>
Output
Refresh the Polymer server and following will be the output.
polymer_elements.htm
Advertisements