Cardview in Nativescript-Vue


How do I make a card in Vue-Nativescript?


Did you go through the docs?


Yeah i did and even the sample there for Gradient doesn’t work either


There is an article on how to use plugins using the Vue-CLI. There are some differences to account for when comparing to other ways of building NativeScript apps.


i assume klever34 , just like me, come from ionic background, which is very easy to create card component.

while in nativescript we had to manually create it with gridlayout


Yeah man, but how can I accomplish that with GridLayout? Does it have elevation, shadow and the others?


It’s not working, I had installed nativescript-vue 1.3.1 and nativescript-cardview 2.0.5
A tuto about it it’s gonna be great


I did try but it is not working
I use nativescript-vue 1.3.1 and nativescript-cardview 2.0.5

If you managed to do it, we would like to see your code about it and publish an article because I integrate well and do what it takes for that but I bug like result


what error are you getting @Fabiyo


I add CardView
I use it in my project
and the bug

I love NativeScript-Vue but there is not enough plugin around it !


I think an example on play.nativescript is gonna be great


In phone is writting

An uncaught Exception occured on “main” thread com.tns.nativescriptException: calling js method onCreateView failled
TypeError.andr" is not a constructor
File:…/tns_modules/nativescript-cardview/cardview.js line 24, column 15


Have you registered it in your main.js file? and you are using and not Card:CardView tag?


in my file main,js

() => require(“nativescript-cardview”).CardView


How should I include it in my main.js file and use it in my template ?


main.js :
Vue.registerElement(‘CardView’, () => require(‘nativescript-cardview’).CardView);

in template:


And you need to update nativescript-vue-externals/index.js.
After the request path join line =>
with this: request = request.replace(’\’,’/’);


@Fabiyo Did you do a clean build after installing the plugin, from the error logs it looks like the android support library was not installed properly. Usually a clean build (deleting the platform folders and running the tns commands again) fixes the issue.


I don’t use nativescript-vue-externals in my project, I’m using simples files js. I did create my project with the command cli “tns create nsvue --template nativescript-vue-template” !
How can I use it ?


okay, then do a clean build