Closed sido420 closed 8 months ago
I use it without any problem in svelte. you should ask those kind of questions in slack or on discord. without code it is hard to help you
@farfromrefug Thanks for your response.
I got it working on NS 6.7.8, but I was trying with the latest which did not work.
Can you share the channel names plz?
@sido420 it s on nativescript website (dont have it right now)
@farfromrefug could you put an example for svelte?
probably we have to register an element with registerElement
but could not figure out what to register.
@ferdavs
registerNativeViewElement('image', () => require('@nativescript-community/ui-image').Img);
@farfromrefug thank you. it works
for completeness
register with
registerNativeViewElement("imgCache", () => require("@nativescript-community/ui-image").Img);
initilize with
const imageModule = require('@nativescript-community/ui-image');
Application.on(Application.launchEvent, () => {
imageModule.initialize({ isDownsampleEnabled: true })
});
I am using Svelte native with this plugin. Whereas most/all plugin work with Svelte native but this one isn't.
I cannot put the attribute in and without that the tag is not working in code. VS Code complains with "Expected valid tag name".
I know svelte is not officially supported but this a community plugin so I thought I might get some help here.