geoctrl / angular-svg-icons Goto Github PK
View Code? Open in Web Editor NEWAngular Component for pure SVG icons using <use>
Angular Component for pure SVG icons using <use>
I'm using ng-cli, and when importing an svg spritesheet using ${svgSymbols} in the template it is erroring with "Error encountered resolving symbol values statically. Expression form not supported". Can you recommend an alternative AoT-safe approach to including the svg content?
Hello, after importing IconModule
to my app module, i had see next error:
Error: Unexpected value 'IconModule' imported by the module 'AppModule'. Please add a @NgModule annotation.
.
I think what this eror is related with angular/angular-cli#6239
Do you have any ideas how to fix it?
Hi, I couldn't get working angular-svg-icons in my app. I get "Could not find a declaration file for module 'angular2-svg-icons'. '...node_modules/angular2-svg-icons/index.js' implicitly has an 'any' type. If I change "noImplicitAny" to false in tsconfig.json the message become more generic: Cannot find module 'angular2-svg-icons'.
@angular/cor@2,4,6; [email protected]
My module:
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {EditComponent} from "../edit/editComponent";
import {JournalEditComponent} from "../edit/journalEditComponent";
import {PdfEditComponent} from "../edit/pdfEditComponent";
import { PdfViewerComponent } from "ng2-pdf-viewer";
import { IconModule } from 'angular2-svg-icons';
import {editRouting} from "../edit/editRoutes";
@NgModule({
imports: [CommonModule, FormsModule,
editRouting, IconModule
],
declarations: [
PdfViewerComponent,
JournalEditComponent,
PdfEditComponent,
],
exports: [],
providers: []
})
export class EditModule { }
From my component:
import {Component, ViewChild} from "@angular/core";
...
import { svgSymbols } from './svg-symbols';
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.