pierreavn / angular-tabler-icons Goto Github PK
View Code? Open in Web Editor NEWTabler Icons components library for your Angular applications
Home Page: https://www.npmjs.com/package/angular-tabler-icons
License: MIT License
Tabler Icons components library for your Angular applications
Home Page: https://www.npmjs.com/package/angular-tabler-icons
License: MIT License
Thank you for allowing us to use your wonderful module.
I would like to know if there is a way to prevent the following message from being output when one of the icons is not loading properly.
Tabler Icon not found: Refer to documentation on https://github.com/pierreavn/angular-tabler-icons
If not, would you please consider adding a feature?
Any chance of supporting Angular 13?
Hi, I'd like to use TablerIconsModule.pick i multiple lazy modules. But I noticed that in version 1.68.1 param multiple: true is no longer preset in OptionsProvider object. I wonder why and whether it is possible to restore it.
Hi,
I'm trying to use the package in an Angular 14 project.
We get following error message while trying to install the package:
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"^14.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"11 - 13" from [email protected]
npm ERR! node_modules/angular-tabler-icons
npm ERR! angular-tabler-icons@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/jonasgerits/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jonasgerits/.npm/_logs/2022-06-29T12_09_56_303Z-debug-0.log
Is it possible to upgrade the package?
Thanks in advance!
Kind regards,
Jonas
This is how I import the icons:
tabler-icons.constant.ts
import { IconBrandLinkedin, IconBrandGithub, IconBrandX } from 'angular-tabler-icons/icons';
import { OptionIcons } from 'angular-tabler-icons/lib/options.interfaces';
export const TABLER_ICONS: OptionIcons = {
IconBrandLinkedin,
IconBrandGithub,
IconBrandX
}
icons.module.ts
import { NgModule } from '@angular/core';
import { TablerIconsModule } from 'angular-tabler-icons';
import { TABLER_ICONS } from '../constants/tabler-icons.constant';
@NgModule({
imports: [
TablerIconsModule.pick(TABLER_ICONS)
],
exports: [
TablerIconsModule
]
})
export class IconsModule { }
app.config.ts
import { ApplicationConfig, importProvidersFrom } from '@angular/core';
import { provideRouter } from '@angular/router';
import { routes } from './app.routes';
import { provideClientHydration } from '@angular/platform-browser';
import { IconsModule } from './modules/icons.module';
export const appConfig: ApplicationConfig = {
providers: [
provideRouter(routes),
provideClientHydration(),
importProvidersFrom(IconsModule),
]
};
Based on the previous, once the app is started, the following error appeared:
NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`. Find more at https://angular.io/errors/NG0203
Versions to reproduce:
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
Hi.
Thanks for the great package.
[Q] Do you plan to support this in Angular v15?
Hi, I'd like to provide some icons for each components, and it working with components within module, but not working in standalone component, because TablerIconsModule.pick
method returns ModuleWithProviders<TablerIconsModule>
and its not suited to imports in standalone components.
Solution is to create provider with pick method, and move picking from imports to providers.
I tested it in local version, but I prefer to use npm package, so I have a PR
I upgraded angular to 14 to create sample standalone component
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.