ui-grid symbols issue

前端 未结 9 958
青春惊慌失措
青春惊慌失措 2020-12-10 10:21

I am using AngularJs ui-grid http://ui-grid.info/.

While implementing, I get something which you can see in the following img in right corner of the cell instead of

相关标签:
9条回答
  • 2020-12-10 10:38

    { expand: true, cwd: 'bower_components/angular-ui-grid', src: ['.eot', '.svg', '.ttf', '.woff'], dest: '<%= yeoman.dist %>/styles' } add this code to grunt file at copy: { dist: {

    0 讨论(0)
  • 2020-12-10 10:38

    If you use ui-grid - v4.6.6, you need to put ui-grid.ttf and ui-grid.woff into folder fonts. So the structure of directory will looks like this:

    ui-grid.min.css
    fonts  # <--  this is a folder
        ui-grid.ttf  # <-- in fonts folder
        ui-grid.woff  # <-- in fonts folder
    
    0 讨论(0)
  • 2020-12-10 10:39

    Please include ui-grid CSS file by this way

    <link rel="stylesheet" href="/release/ui-grid-unstable.css">
    

    and ommit the script tag from the Authors Tutorial or Api

    <script src="/release/ui-grid-unstable.css"></script>
    

    for eg (http://ui-grid.info/docs/#/tutorial/102_sorting)

    0 讨论(0)
  • 2020-12-10 10:48

    If you are using gulp, add this task.

    gulp.task('styles', function() {
    
      // Copy font files needed for angular-ui-grid
      gulp.src(['bower_components/angular-ui-grid/ui-grid.ttf',
        'bower_components/angular-ui-grid/ui-grid.woff',
        'bower_components/angular-ui-grid/ui-grid.eot',
        'bower_components/angular-ui-grid/ui-grid.svg'
      ])
        .pipe(gulp.dest('dist/styles/'))
    
      // Other style tasks here
    
    });
    
    0 讨论(0)
  • 2020-12-10 10:54

    Try to include in your project :

    <link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/angular-ui/bower-ui-grid/master/ui-grid.min.css">
    
    <script src="https://cdn.rawgit.com/angular-ui/bower-ui-grid/master/ui-grid.min.js"></script>
    
    0 讨论(0)
  • 2020-12-10 10:55

    I would just like to add this answer (stolen verbatim from panciz) for the folks using Grunt who would like to have these automatically copied. This needs to be placed in your Gruntfile.js:

    copy: {
          dist: {
            files: [
               ...
            //font di ui grid
             {
                  expand: true,
                  flatten: true,
                  dest: 'dist/styles/',
                  src: ['bower_components/angular-ui-grid/ui-grid.ttf',
                        'bower_components/angular-ui-grid/ui-grid.woff',
                        'bower_components/angular-ui-grid/ui-grid.eot',
                        'bower_components/angular-ui-grid/ui-grid.svg'
                        ]
                }
        ]},
    
    0 讨论(0)
提交回复
热议问题