Skip to content

Import folders of SVG assets #2521

Closed
Closed

Description

@splacentino

Hello.

I am using the ng-lightning module on my project. To work well, I had to import the vendor css from the package in the main styles.css file with "@import".

@import "../node_modules/myPackage/assets/styles/style.min.css"

But to work better, I need assets/icons folders from the package. How to include them ?

node_modules/myPackage/assets/icons // subfolders of svg files

ng-lightning use a path to svg folder at the import. I can't give a node_modules/* path

import { NglModule } from 'ng-lightning/ng-lightning';

@NgModule({
  imports: [
    NglModule.forRoot({ svgPath: 'path_to_include_svg_folder' })
  ]
  bootstrap: [AppComponent]
})

Activity

  1. Meligy commented on Oct 5, 2016

    @Meligy
    Contributor

    Unfortunately this is pretty much a duplicate of #1942, which seems to be a while before getting a resolution.

  2. filipesilva commented on Oct 9, 2016

    @filipesilva
    Contributor

    #1942 was solved via #2570, but that PR wouldn't allow for the functionality you need. Since node_modules isn't copied over to dist/, you'll need to have those assets inside your project (in src/assets/ for instance).

  3. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  4. locked and limited conversation to collaborators on Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions