How HTML adds a pentagram/star pattern-github-octicons

Source: Internet
Author: User
Tags export class

Bootstrap-4 removed glyphicons/glyphicons-migration
Is there any other way to add a pentagram/star pattern?
Using GitHub octicons:
NPM Install Octicons

<svg width= "height=" viewbox= "0 0" aria-hidden= "true" >
<image xlink:href= "Node_modules/octicons/build/svg/star.svg"/>
</svg>

Ref:https://github.com/primer/octicons/issues/123
Https://stackoverflow.com/questions/32612690/bootstrap-4-glyphicons-migration
http://efe.baidu.com/blog/delivering-octicons-with-svg/

Product Star Rating:
Export class Starscomponent implements OnInit {@Input ()  private  rating:number =0;  Private staricon:string;  Constructor () {  }  Ngoninit () {    This.staricon = "";    for (let i=1;i<=5;i++) {      if (i<= this.rating) This.staricon = This.staricon + "★";      else This.staricon = This.staricon + "☆";}}       

Effect:

How HTML adds a pentagram/star pattern-github-octicons

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.