-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to initialize svg-icons in typescript? #108
Comments
This |
Actually, this part of the code is being used in the ngoninit method. I am essentially trying to add some svg photos on a map using openlayers, and want to manipulate them to flash borders etc ( animate ). |
What version of Angular are you using? |
Thanks. I've never attempted to use the component in the way that you're using it with |
Hi, I am trying to initialize this in a typescript file using document.createElement to display in a map webapp as an overlay (openlayers).
let jtiImageElement = document.createElement('svg-icon'); jtiImageElement.setAttribute('src', 'assets/icons/jtis/1A.svg'); //jtiImageElement.setAttribute([stretch],"true"); //jtiImageElement['src'] =
assets/icons/jtis/1A.svg; jtiImageElement['[svgStyle]'] = "{width.px:'100', height.px:'100'}";
ive tried initializing it this way, there is a svg-icon in the DOM but there is no image and the dimensions are 0x0. the url of the svg is also working.
The text was updated successfully, but these errors were encountered: