How to include ui-grid font files into the project

前端 未结 8 672
独厮守ぢ
独厮守ぢ 2021-01-07 19:55

I have been stuck with anjularjs ui-grid, it\'s showing some Chinese symbols in place of icons. After digging about it I get to know I have to use some font-files provided b

相关标签:
8条回答
  • 2021-01-07 20:36

    I know it's a little bit late but I just want to share my answer. I use bower to install ui-grid and gruntjs to load files. Its almost the same with Panciz answer but change it to *.{ttf,woff,eot,svg} for getting all font files needed without specifying them.

    add this in copy:

    copy: {
      dist: {
        files: [
          //other files here
          , {
              expand: true,
              flatten: true,
              cwd: '<%= yeoman.client %>',
              dest: '<%= yeoman.dist %>/public/app', //change destination base to your file structure
              src: [
                '*.{ttf,woff,eot,svg}',
                'bower_components/angular-ui-grid/*',
              ]
            }
        ]
      }
    }
    
    0 讨论(0)
  • 2021-01-07 20:36

    Pretty much the same answer as Panciz and Vicruz, but I specified the relevant directories slightly differently:

    copy: {
         dist: {
            files: [{
               // other files here...
            }, {
               expand : true,
               cwd : 'bower_components/angular-ui-grid',
               dest : '<%= yeoman.dist %>/styles',
               src : ['*.eot','*.svg','*.ttf','*.woff']
            }]
         },
    
    0 讨论(0)
提交回复
热议问题