Help Needed Building Plugin


Hi All,

So working on a project for University, and need some help and guidance with plugins.

A high level overview of the plugin is a plugin which contains customised components for a company, to allow a more stream lime ability to develop applications.

What I want to achieve is having a plugin, which has multiple containers of different stuff.


A customised plugin, which makes an API call to login a user.

This is where I need help.

The plugin will have a folder called “LoginBtn” - within that folder, it will contain the CSS, XML, JS, JS-View files to create that button and implement the API calling.

Once the plugin is installed, do I simply do the following to call the button and have it appear in my application.


<Page loaded="pageLoaded" class="page" xmlns:loginBtn="~/name-of-plugin/loginBtn/loginBtn-page" xmlns=""
		<loginBtn:loginBtn-Frm class="loginA" tap="loginA" />

I attempt to call the JS file for the loginBtn within the plugin, which is "loginBtn-page.js" 

I'm trying to follow the method of this example:

Any help and guidance would be amazing. I'll clean up my code, and try and upload an example to GITHUB today.

Thanks, Harrison


Did you install your plugin via node_modules or it’s directly placed in side your app folder?


Hey manojdcoder,

I followed the method of building plugins that Nativescript gives in its tutorials.

I use the “./” method to build the plugin.

And then “tns add plugin ‘plugin-name.tgz’”

Is this not the correct way?