Looks like [class] property doesn't work
See original GitHub issuei tried to use it like
<svg-icon name='travel' [svgStyle]="{ 'width.px':22, 'height.px':22 }" [class]="'test-class'"></svg-icon>
and i can’t see test-class on the svg-icon compoent.
but with normal class like class=“test-class” it works
maybe it’s because https://github.com/czeckd/angular-svg-icon/blob/4f6319ec165a293f387aa2a3c5d4632d7017dd01/projects/angular-svg-icon/src/lib/svg-icon.component.ts#L83
or i did something wrong?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
typescript - Class property doesn't exist - Stack Overflow
I have set up 2 basic projects with the same configuration for Babel and Typescript. One of my project is actually a module,...
Read more >Unable to access extended properties in constructor #1617
To execute the Base constructor after Derived class values have been set I am including Base constructor's operations in a setTimeout function.
Read more >this - JavaScript | MDN
Class methods behave like methods in object literals — the this value is the object that the method was accessed on. If the...
Read more >How To Use Classes in TypeScript | DigitalOcean
Classes are a common abstraction used in object-oriented programming (OOP) languages to describe data structures known as objects.
Read more >Effective Dart: Design
Since privacy in Dart works at the library level, not the class level, this is a way to define “friend” classes like you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Andikki - Thanks! That was the clue I needed. A new version should be available shortly that hopefully will resolve this interpolated
class
issue onsvg-icon
.I see. The code where
class
broke uses interpolation, like so:In this case, with
someCalculatedValue
resolving to1
, I should see the classicon--1
on the<svg-icon>
, but it doesn’t happen.I now see that simple cases with no interpolation work as intended.