nativescript-community / ui-lottie

NativeScript plugin to expose Airbnb Lottie
https://github.com/airbnb/lottie-android
Other
177 stars 57 forks source link

I am completely confused #8

Closed evomedia247 closed 7 years ago

evomedia247 commented 7 years ago

How do you get this working with the standard nativescript templates?

If I create a new project with say https://github.com/NativeScript/template-hello-world-ng

Then look at the your documentation ... it says just say add some code to the xml and then add some code to the TS,

But I'm really stuck .... as there is NO xml file in the templates, I thought I could just add to the html view ... however the main app one does declare <page

So can you add the following straight to the StackLayout instead like this: <StackLayout xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:Lottie="nativescript-lottie" navigatingTo="navigatingTo" class="page">

</StackLayout>

Then regarding the .ts code ... in these templates you have main.ts, app.module.ts, app.component.ts etc so which one to add the code to?

I've tried and tried and can't get it working, but can the documentation PLEASE cover the various native script project types, pure js, pure ts and angular + ts

bradmartin commented 7 years ago

😄 the docs reference .xml for plain nativescript templates, you are using the Angular template so it uses .html template files. The plugin needs some updates to work with Angular I believe. Not my specialty, so if you know angular you could possibly help determine what is needed to make this work with NG+NS apps.

evomedia247 commented 7 years ago

Ah so isn't working hence my confusion, can you update the description to make it clear what type of NS projects it will work with

bradmartin commented 7 years ago

README updated - will accept a PR for angular support