1

It can't show icons in action buttons, when I inspect the page, it doesn't load me ":: before"

I can't see icons in buttons!

How can I replace ionicons for eva icons.

I added the smart table to my project but I was not successful in showing icons of the eva icons package. I follow this guide:

https://github.com/akveo/ng2-smart-table

working example in http://akveo.com/ngx-admin/pages/tables/smart-table

<a class="ng2-smart-action ng2-smart-action-add-add ng-star-inserted" href="#">
<i class="nb-plus">
  ::before == $0
</i></a>

my code at inspection

<a class="ng2-smart-action ng2-smart-action-add-add ng-star-inserted" href="#"> == $0
<i class="nb-plus"></i></a>

my settings:

settings = {
          add: {
            addButtonContent: '<i class="nb-plus"></i>',
            createButtonContent: '<i class="nb-checkmark"></i>',
            cancelButtonContent: '<i class="nb-close"></i>',
          },
          edit: {
            editButtonContent: '<i class="nb-edit"></i>',
            saveButtonContent: '<i class="nb-checkmark"></i>',
            cancelButtonContent: '<i class="nb-close"></i>',
          },
          delete: {
            deleteButtonContent: '<i class="nb-trash"></i>',
            confirmDelete: true,
          },
          columns: {
            id: {
              title: 'ID',
              type: 'number',
            },
            firstName: {
              title: 'First Name',
              type: 'string',
            },
            lastName: {
              title: 'Last Name',
              type: 'string',
            },
            username: {
              title: 'Username',
              type: 'string',
            },
            email: {
              title: 'E-mail',
              type: 'string',

            },
            age: {
              title: 'Age',
              type: 'number',
            },
          },
        };

I need to change and display the icons on the action buttons

Dharman
  • 30,962
  • 25
  • 85
  • 135
jorocoimbra
  • 13
  • 1
  • 3

1 Answers1

2

hit like if you find my answer useful.

Reason: Look at the package.json file of the given template https://github.com/akveo/ng2-smart-table/blob/master/package.json .

  1. You will find that you need to install "nebular-icons": "^1.1.0", with the command npm i nebular-icons@1.1.0

  2. Add the "node_modules/nebular-icons/scss/nebular-icons.scss" in styles array in angular.json file of you project to include the nebular icons styles. Take the reference from https://github.com/akveo/ng2-smart-table/blob/master/angular.json

  3. Run the project with ng serve -o