npm i --save nativescript-unique-identifier
- Version: 1.0.0
- GitHub:
- NPM: https://www.npmjs.com/package/nativescript-unique-identifier
- Downloads:
- Last Day: 0
- Last Week: 0
- Last Month: 0
NativeScript UUID Plugin
Usage
See this example for Angular:
import { Component, OnInit } from "@angular/core";
import {UniqueIdentifier} from "nativescript-unique-identifier"
@Component({
selector: "ns-main",
template: "<page-router-outlet></page-router-outlet>"
})
export class AppComponent {
constructor() {
}
ngOnInit(){
let uuid = new UniqueIdentifier();
console.log(uuid.getUUID());
}
}
And for pure NativeScript:
var plugin = require("nativescript-unique-identifier").UniqueIdentifier;
console.log(plugin.getUUID());
## Installation
```bash
$ tns plugin add nativescript-unique-identifier