Closed dlucidone closed 7 years ago
Hi,
Can you provide some more information? Which platform, device, version. And which command do you use to run your app? A repo with your app would also help.
@EddyVerbruggen I'm developing android app using nativescript-angular. I installed the lib successfully and using your readme I created my ts file
import { Component } from "@angular/core";
import {Observable} from "data/observable";
import {SecureStorage, GetOptions, SetOptions} from "nativescript-secure-storage";
@Component({
selector: "Date",
templateUrl: "pages/Date/Date.html",
})
export class ConfigureDatePickerComponent extends Observable {
public message: string;
private secureStorage: SecureStorage;
constructor() {
super();
this.secureStorage = new SecureStorage();
}
public doGet() {
let that = this;
this.secureStorage.get({
key: "foo"
}).then((value) => {
console.log("Value: " + value);
that.set("lastRetrievedValue", value === null ? "(no value set)" : value);
}, (err) => {
console.log(err);
});
}
public doSet() {
let that = this;
this.secureStorage.set({
key: "foo",
value: "I was set at " + new Date()
}).then((success) => {
console.log("Successfully set a value? " + success);
}, (err) => {
console.log(err);
});
}
}
my package.json dependencies-
"dependencies": {
"@angular/common": "2.1.2",
"@angular/compiler": "2.1.2",
"@angular/core": "2.1.2",
"@angular/http": "2.1.2",
"@angular/platform-browser": "2.1.2",
"@angular/platform-browser-dynamic": "2.1.2",
"@angular/platform-server": "2.1.2",
"@angular/router": "3.1.2",
"nativescript-angular": "1.1.3",
"nativescript-calendar": "^1.2.0",
"nativescript-secure-storage": "^2.0.0",
"reflect-metadata": "0.1.8",
"rxjs": "5.0.0-beta.12",
"tns-core-modules": "2.4.0"
Anything you need specifically to reproduce the same error please let me know.Thanks
And which command do you use to run your app?
on CLI - tns livesync android --watch
Can you try removing and readding the platform and tns run android
? If that works go ahead and use livesync again.
Yeah i have tried removing android platform and installing again and run the command. still facing the same issue.
OK, let me try this as well as coincidentally I'm building a {N} app with TypeScript (Angular) at the moment and need this plugin myself.
Tried it, works great.
Your problem sounds like #3 (same issue, but for iOS). Can you try tns emulate android
/ tns run android
and then run with livesync
again?
i'm getting this error while implementing this -
Cannot read property 'hawk' of undefined
Any Help!!