ng click not calling the function --very new to angular and ionic - android

trying to insert data to the sqlite db and the data is static that i am passing it through the function but ng click is not working. as i am new to this so please answer in details...thanks in advance.
//this is my module
var db=null;
var myApp=angular.module('starter', ['ionic','ngCordova'])
.run(function($ionicPlatform,$cordovaSQLite) {
$ionicPlatform.ready(function() {
if(window.cordova && window.cordova.plugins.Keyboard) {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
// Don't remove this line unless you know what you are doing. It stops the viewport
// from snapping when text inputs are focused. Ionic handles this internally for
// a much nicer keyboard experience.
cordova.plugins.Keyboard.disableScroll(true);
}
if(window.StatusBar) {
StatusBar.styleDefault();
}
db = $cordovaSQLite.openDB({name:"my.db",location:'default'});
$cordovaSQLite.execute(db,"CREATE TABLE IF NOT EXISTS user(id integer primary key, username text, password text)")
});
})
//this is my controller
myApp.controller('SignInCtrl',['$cordovaSQLite', function($scope, $cordovaSQLite) {
$scope.insert=function(username,password){
alert("hii");
var query="INSERT INTO user(username,password) VALUES(?,?)";
$cordovaSQLite.execute(db.query,[username,password]).then(function(res){
console.log("Insert ID ->" + res.insertId);
},
function(err){
console.error(err);
});
}
$scope.select = function(username) {
var query = "SELECT username, password FROM user WHERE username = ?";
$cordovaSQLite.execute(db, query, [password]).then(function(res) {
if(res.rows.length > 0) {
console.log("SELECTED -> " + res.rows.item(0).username + " " + res.rows.item(0).password);
} else {
console.log("No results found");
}
}, function (err) {
console.error(err);
});
}
}])
//this is my page
<ion view view-title="Sign-In" name="Login-View">
<ion content class="padding">
<div class="list list-inset">
<label class="item item-input">
<input type="text" placeholder="Username" ng-model="data.username">
</label>
<label class="item item-input">
<input type="password" placeholder="Password" ng-model="data.password"></input>
</label>
</div>
</ion>
<button class="button button-block button-positive" ng-click="login(data)">Login</button>
</ion>
<br>
Sign Up
Forgot Password
Order page
<button class="button button-block button-positive" ng-click="insert('ran','badu')">insert</button>
<button class="button button-block button-positive" ng-click="select('ran')">select</button>
//this is my index page
<body ng-app="starter">
<ion-header-bar class="bar-positive">
<h1 class="title">Billing system</h1>
<button class="button icon ion-navicon"></button>
<button class="button icon ion-search"></button>
</ion-header-bar>
<!-- <ion-content > -->
<!-- <P>I am in index</P>
Loginpage -->
<!-- </ion-content> -->
<ion-nav-view class="slide-left-right"></ion-nav-view>
</body>
//this is my route
.config(function($stateProvider,$urlRouterProvider) {
$stateProvider
.state('Login',{
url:'/Login',
templateUrl:'templates/Login.html',
controller:'SignInCtrl'
})
.state('Signup',{
url:'/Signup',
templateUrl:'templates/Signup.html',
controller:'SignInCtrl'
})
.state('ForgotPassword',{
url:'/ForgotPassword',
templateUrl:'templates/ForgotPassword.html',
controller:'SignInCtrl'
})
.state('orderpage',{
url:'/orderpage',
templateUrl:'templates/orderpage.html',
controller:'SignInCtrl'
})
$urlRouterProvider.otherwise('/Login');
})

You have an error with SignInCtrl declaration. Change this line of code
myApp.controller('SignInCtrl',['$cordovaSQLite', function($scope, $cordovaSQLite)
with
myApp.controller('SignInCtrl',['$scope','$cordovaSQLite', function($scope, $cordovaSQLite)
The problem here is that you use inline dependency injection and the order is important

Looking at your code the login() method does not exist in your SignIn controller try adding the login method to the controller
myApp.controller('SignInCtrl', ['$cordovaSQLite', function ($scope, $cordovaSQLite) {
$scope.insert = function (username, password) {
alert("hii");
var query = "INSERT INTO user(username,password) VALUES(?,?)";
$cordovaSQLite.execute(db.query, [username, password]).then(function (res) {
console.log("Insert ID ->" + res.insertId);
},
function (err) {
console.error(err);
});
}
$scope.select = function (username) {
var query = "SELECT username, password FROM user WHERE username = ?";
$cordovaSQLite.execute(db, query, [password]).then(function (res) {
if (res.rows.length > 0) {
console.log("SELECTED -> " + res.rows.item(0).username + " " + res.rows.item(0).password);
} else {
console.log("No results found");
}
}, function (err) {
console.error(err);
});
}
$scope.login = function(data){
//Add Login Logic ....:)
console.log(data)
}
}])

Related

Use user data logged in with firebase on ionic 4

I am a child with an application with Ionic 4, my application is already logging in with Email, Facebook and Google using Firebase. I created a comments page and the comments are already being saved in Firestore and being displayed on a page. Wow do I get the logged in user data and insert it in this page. Comments?
I used the following solution:
JS:
in the builder
fireAuth.user.subscribe((data => {
this.user = data;
}));
Methods
listarComentarios() {
this.crudService.read_Comentarios().subscribe(data => {
this.comentarios = data.map(e => {
return {
id: e.payload.doc.id,
isEdit: false,
Comentario: e.payload.doc.data()['Comentario'],
Usuario: e.payload.doc.data()['Usuario'],
Foto: e.payload.doc.data()['Foto']
};
})
console.log(this.comentarios);
});
CreateRecord() {
let record = {};
record['Comentario'] = this.comentarioUsuario;
record['Usuario'] = this.user.displayName
record['Foto'] = this.user.photoURL
this.crudService.create_NewComentario(record).then(resp => {
this.comentarioUsuario = "";
this.user.displayName = "";
this.user.photoURL = "";
console.log(resp);
})
.catch(error => {
console.log(error);
});
HTML:
<ion-content>
<ion-grid *ngFor="let item of comentarios">
<span *ngIf="!item.isEdit; else elseBlock">
<!-- this rows will represent sample comments -->
<ion-row class="post-content">
<ion-col size="2" >
<ion-avatar class="ion-align-self-start">
<img class="icon-photo" [src]="item.Foto">
</ion-avatar>
</ion-col>
<ion-col size="6">
<div>
<p><strong>{{item.Usuario}} </strong>{{item.Comentario}}</p>
</div>
</ion-col>
<ion-col>

Return More Than One Data with Ionic, SQLite

i am trying to retrive some data with sqlite from ionic framework. But i am newbie, so i need your help.
I want to retrieve data from db with sqlite as a list, all data.
If // console.log line command is open, i only get one data, not the others.
If app.js is like this, i get this error.
TypeError: Cannot read property 'push' of undefined
at app.js:65
at processQueue (ionic.bundle.js:20962)
at ionic.bundle.js:20978
at Scope.$get.Scope.$eval (ionic.bundle.js:22178)
at Scope.$get.Scope.$digest (ionic.bundle.js:21994)
at Scope.scopePrototype.$digest (hint.js:1468)
at ionic.bundle.js:22216
at completeOutstandingRequest (ionic.bundle.js:12714)
at ionic.bundle.js:13094
app.js
var db = null;
var example = angular.module('starter', ['ionic', 'ngCordova'])
.run(function($ionicPlatform, $cordovaSQLite) {
$ionicPlatform.ready(function() {
if(window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
if(window.StatusBar) {
StatusBar.styleDefault();
}
if (window.cordova) {
db = $cordovaSQLite.openDB({ name: "my.db" }); //device
}else{
db = window.openDatabase("my.db", '1', 'my', 1024 * 1024 * 100); // browser
}
$cordovaSQLite.execute(db, "CREATE TABLE IF NOT EXISTS people (id integer primary key, firstname text, lastname text)");
});
});
example.controller("ExampleController", function($scope, $cordovaSQLite) {
$scope.insert = function(firstname, lastname) {
var query = "INSERT INTO people (firstname, lastname) VALUES (?,?)";
$cordovaSQLite.execute(db, query, [firstname, lastname]).then(function(result) {
console.log("INSERT ID -> " + result.insertId);
}, function (error) {
console.error(error);
});
}
$scope.select = function(lastname) {
var query = "SELECT firstname, lastname FROM people WHERE lastname = ?";
$cordovaSQLite.execute(db, query, [lastname]).then(function(result) {
if(result.rows.length > 0) {
console.log("SELECTED -> " + result.rows.item(0).firstname + " " + result.rows.item(0).lastname);
} else {
console.log("No results found");
}
}, function (error) {
console.error(error);
});
}
$scope.selectAll = function() {
var query = "SELECT firstname, lastname FROM people";
var outputs = [];
$cordovaSQLite.execute(db, query, []).then(function(result) {
if(result.rows.length > 0) {
for(var i = 0; i < result.rows.length; i++) {
//console.log("SELECTED -> " + result.rows.item(i).firstname + " " + result.rows.item(i).lastname);
/* $scope.outputs = [
{"firstname": result.rows.item(i).firstname}
]; */
$scope.outputs.push({
"firstname" : result.rows.item(i).firstname,
});
}
} else {
console.log("No results found");
}
}, function (error) {
console.error(error);
});
}
});
example.controller("PeopleCtrl", function($scope) {
$scope.people = [
{firstName: 'John', lastName: 'Doe', address: {city: 'Chandler', state: 'AZ', zip: 85248}},
{firstName: 'Jane', lastName: 'Doe', address: {city: 'Chandler', state: 'AZ', zip: 85248}},
{firstName: 'Johnny', lastName: 'Doe', address: {city: 'Phoenix', state: 'AZ', zip: 85003}}
];
});
and index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="js/ng-cordova.min.js"></script>
<script src="cordova.js"></script>
<script src="js/app.js"></script>
</head>
<body ng-app="starter">
<ion-pane>
<ion-header-bar class="bar-stable">
<h1 class="title">Ionic Blank Starter</h1>
</ion-header-bar>
<ion-content>
<div ng-controller="ExampleController">
<button class="button" ng-click="insert('Arzu','Acar')">Insert</button>
<button class="button" ng-click="selectAll()">Select</button>
<ul>
<li ng-repeat="output in outputs">
<span class="bold">{{output.firstname}}</span>
</li>
</ul>
</div>
<div ng-controller="PeopleCtrl">
<div id="peopleContainer">
People:<br /><br />
<ul>
<li ng-repeat="person in people">
<span class="bold">{{person.firstName}} {{person.lastName}}</span>
<br />
{{person.address.city}}, {{person.address.state}} {{person.address.zip}}
</li>
</ul>
</div>
</div>
</ion-content>
</ion-pane>
</body>
</html>
Thank you.
In ExampleController:selectAll, you have the following declaration:
var outputs = [];
Then push to an array that doesn't exist on $scope:
$scope.outputs.push({
"firstname" : result.rows.item(i).firstname,
});
I think you meant to initialize the $scope.outputs array each time selectAll is called:
$scope.outputs = [];
You must declare in the controller's main scope:
$scope.outputs = [];
Your "selectAll" function should be like this:
$scope.selectAll = function() {
var query = "SELECT firstname, lastname FROM people";
$scope.outputs.length = 0;
$cordovaSQLite.execute(db, query).then(function(result) {
if(result.rows.length > 0) {
for(var i = 0; i < result.rows.length; i++) {
$scope.outputs.push({
firstName : result.rows.item(i).firstname
});
}
} else {
console.log("No results found");
}
}, function (error) {
console.error(error);
});
}
Hope this works! :)

values not inserting in sqlite database using cordova

I have created a form for inserting data from textbox into the database and when I run it in the browser I can see the table is created and values are inserted.
I tried implementing the same using cordova and table getting created and values are not getting inserted..
Here is my coding..
document.addEventListener("deviceready", function()
{
var db=window.sqlitePlugin.openDatabase({name : "mydb"});
var createStatement = "CREATE TABLE IF NOT EXISTS login(id INTEGER PRIMARY KEY AUTOINCREMENT,username TEXT,password TEXT,firstname TEXT, lastname TEXT,hobby TEXT,email TEXT)";
var insertStatement = " INSERT INTO login(username,password,firstname,lastname,hobby,email) VALUES (?,?,?,?,?,? ) ";
function initDatabase() // Function Call When Page is ready.
{
try {
if (!window.openDatabase) // Check browser is supported SQLite or not.
{
// alert('Databases are not supported in this browser.');
}
else {
createTable(); // If supported then call Function for create table in SQLite
}
}
catch (e) {
if (e == 2) {
// Version number mismatch.
console.log("Invalid database version.");
} else {
console.log("Unknown error " + e + ".");
}
return;
}
}
function createTable() // Function Call When Page is ready.
{
var res=db.transaction(function (tx) { tx.executeSql(createStatement, [], onError); });
alert("Successfully created the table");
}
function onError(tx, error) // Function for Hendeling Error...
{
// alert(error.message);
}
});
document.addEventListener("deviceready", function()
{
var db=window.sqlitePlugin.openDatabase({name : "mydb"});
function insertRecord()
{
var usernameold = $('input:text[id=username]').val();
var passwordold = $('input:password[id=pass]').val();
var firstnameold = $('input:text[id=firstname]').val();
var lastnameold = $('input:text[id=lastname]').val();
var hobbyold = $('input:text[id=hobby]').val();
var emailold = $('input:text[id=email]').val();
db.transaction(function (tx) { tx.executeSql(insertStatement, [usernameold,passwordold,firstnameold, lastnameold,hobbyold,emailold]/*,loadAndReset, onError*/) });
alert("Successfully created the table");
}
});
$(document).ready(function()
{
initDatabase();
$("#submit").click(insertRecord);
});
Tried saving and importing the database from fileexprorer->data->data->projectpackage->databases->mydb.db
then firefox->sqlitemanager->connectdb
I can see the table is getting created and the values are not inserting
Plz help...
can insert the values:
db.transaction(function (tx)
{
tx.executeSql('INSERT INTO login (username,pass,firstname,lastname,hobby,email)VALUES("'+un+'","'+ps+'","'+fs+'","'+ls+'","'+hb+'","'+ed+'")');
});
});
}
Where
var un= $("#username").val();
var ps= $("#pass").val();
var fs = $('input:text[id=firstname]').val();
var ls = $('input:text[id=lastname]').val();
var hb = $('input:text[id=hobby]').val();
var ed = $('input:text[id=email]').val();
http://docs.phonegap.com/en/1.2.0/phonegap_storage_storage.md.html check the above link for db storage queries.
Try with the below code . Hope this will help you.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
document.addEventListener("deviceready", onDeviceReady, false);
var nameval,pwdval,fnameval,lnameval,hobbyval,emailval;
function onDeviceReady() {
var db = window.openDatabase("Logindetails_DB", "1.0", "Logindetails_DB", 100000);
db.transaction(populateDB, errorCB, successCB);
}
function validationCheck(){
nameval=document.getElementById('u_name').value;
pwdval=document.getElementById('u_pwd').value;
fnameval=document.getElementById('u_firstname').value;
lnameval=document.getElementById('u_lastname').value;
hobbyval=document.getElementById('u_hobby').value;
emailval=document.getElementById('u_email').value;
if(document.getElementById('u_name').value==""){
alert('Enter Your Name');
}
if(document.getElementById('u_pwd').value==""){
alert('Enter Your Password');
}
if(document.getElementById('u_firstname').value==""){
alert('Enter Your FirstName');
}
if(document.getElementById('u_lastname').value==""){
alert('Enter Your LastName');
}
if(document.getElementById('u_hobby').value==""){
alert('Enter Your HobbyName');
}
if(document.getElementById('u_email').value==""){
alert('Enter Your Email');
}
if(nameval!='' && pwdval!='' && fnameval!='' && lnameval!='' && hobbyval!='' && emailval!=''){
alert('Name'+nameval+'Pwd'+pwdval);
Insertvalue();
}
}
function Insertvalue(){
var db = window.openDatabase("Logindetails_DB", "1.0", "Logindetails_DB", 100000);
db.transaction(getregistdata, transaction_error);
}
function getregistdata(tx){
tx.executeSql('INSERT INTO login (username, password, firstname,lastname,hobby,email) VALUES ("'+nameval+'", "'+pwdval+'","'+fnameval+'","'+lnameval+'","'+hobbyval+'","'+emailval+'")');
alert('Record Inserted Successfully');
}
function transaction_error(tx, error) {
alert("Database Error: " + error);
}
// Populate the database
function populateDB(tx) {
tx.executeSql('CREATE TABLE IF NOT EXISTS login(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, username TEXT NOT NULL, password TEXT NOT NULL, firstname TEXT NOT NULL,lastname TEXT NOT NULL,hobby TEXT NOT NULL,email TEXT NOT NULL)');
}
// Transaction error callback
//
function errorCB(tx, err) {
alert("Error processing SQL: "+err);
}
// Transaction success callback
//
function successCB() {
alert("success!");
}
</script>
</head>
<body>
<h1>Hello PhoneGap</h1>
<form name="form1" id="form1" method="post">
User Name: <br><input type="text" name="u_name" id="u_name"><br><br>
Password:<br><input type="text" name="u_pwd" id="u_pwd"><br><br>
First Name<br> <input type="text" name="u_firstname" id="u_firstname"><br><br>
Last Name<br> <input type="text" name="u_lastname" id="u_lastname"><br><br>
Hobby<br> <input type="text" name="u_hobby" id="u_hobby"><br><br>
Email<br> <input type="text" name="u_email" id="u_email"><br><br>
<div style="text-align:center;">
<input type="button" name="submitbtn" id="submitbtn" value="Submit" onclick="validationCheck()">
</div>
</form>
</body>
</html>

Phonegap Can't Redirecting to a page

So I have this form where upon submission I do a SQL query and redirect it to another page. But when I try to test this on the android tablet it doesnt redirect, nor does it error meaning the SQL call is valid and works...can someone please help me out
<div class="wrapper">
<div class="oneSection">
<form method="post" action="" id="barcodeForm">
Barcode: <br/>
<input name="barcode" id="barcode" type="text" class="sub"/><br/>
<input type="submit" class="open" id="before" value="SUBMIT" onclick="check()" />
</form>
</div>
</div>
<script type="text/javascript">
function check() {
var barcode = $('#barcode').val();
if(barcode.length <= 0) {
$('#barcode').css('border', '2px solid red');
e.preventDefault();
return;
} else {
alert(barcode.length);
var barcode = $('#barcode').val();
checkBarcode(false, barcode);
}
}
function checkBarcode(doAuto, id) {
var successCall;
if (doAuto) {
successCall = function (tx, result) {
var item = result.rows.item(0);
$('[name="client"]').val(item['cname']);
$('[name="address"]').val(item['address']);
$('[name="sitename"]').val(item['sname']);
$('[name="model"]').val(item['model']);
$('[name="lasttested"]').val(item['ltest']);
$('[name="nounits"]').val(item['units']);
$('[name="comments"]').val(item['comments']);
}
} else {
test.innerHTML += 'at the start<br/>';
successCall = function () {
var URL = 'test.html?id=' + id;
window.location.href = URL;
}
}
var queryDB = function queryDB(tx) {
tx.executeSql(getBarcode, [id], successCall, onError);
}
db.transaction(queryDB, onError);
}
</script>
What happens at the moment is that it submit's the input value and resets the form without forwarding the page or anything...

How to share text message in LinkedIn wall in PhoneGap?

I am developing one application in PhoneGap in that application i want to share text-message in Facebook,twitter and LinkedIn. for ANDROID-LinkedIn i am searching many Google links but i am getting good one. please help me i am struck here
I am implementing this sample:
<html>
<head>
<title>OAuthSimple w/ LinkedIn</title>
<script src="OAuthSimple.js"></script>
<script>
/*
You must edit the two following lines and put in your consumer key and shared secret
*/
var consumer_key = "ibmay1qostgk";
var shared_secret = "4HqeDRZ2ZKAvASlM";
/*
Nothing below here needs to be edited for the demo to operate
*/
var oauth_info = {};
var oauth = OAuthSimple(consumer_key, shared_secret);
function parse_response(response, callback)
{
response.replace(new RegExp("([^?=&]+)(=([^&]*))?", "g"), function($0, $1, $2, $3) { oauth_info[$1] = $3; });
callback.call();
}
function authorize_url()
34{
set_url("https://www.linkedin.com/uas/oauth/authenticate?oauth_token=" + oauth_info.oauth_token, document.getElementById("au"));
}
function access_token_url(pin) {
oauth.reset();
var url = oauth.sign({action: "GET", path: "https://api.linkedin.com/uas/oauth/accessToken", parameters: {oauth_verifier: pin}, signatures: oauth_info}).signed_url;
set_url(url, document.getElementById("at"));
}
function fetch_profile_url() {
oauth.reset();
var url = oauth.sign({action: "GET", path: "https://api.linkedin.com/v1/people/~", signatures: oauth_info}).signed_url;
set_url(url, document.getElementById("fp"));
}
function set_url(url, element) {
element.value = url;
var span = document.createElement("span");
span.innerHTML = " <a href='" + url + "' target='_blank'>Open</a>";
element.parentNode.insertBefore(span, element.nextSibling);
}
window.onload = function() {
var url = oauth.sign({action: "GET", path: "https://api.linkedin.com/uas/oauth/requestToken", parameters: {oauth_callback: "oob"}}).signed_url;
set_url(url, document.getElementById("rt"));
}
</script>
</head>
<body>
<h1>OAuthSimple w/ LinkedIn</h1>
<label for="rt">Request Token URL:</label> <input type="text" size="100" name="rt" id="rt" >
<br><br>
<label for="rtr">Request Token Response:</label><br><textarea rows="5" cols="75" name="rtr" id="rtr"></textarea>
<br>
<button onclick="javascript:parse_response(document.getElementById('rtr').value, authorize_url)">Parse Response</button>
<br><br>
<label for="au">Authorize URL:</label> <input type="text" size="100" name="au" id="au">
<br><br>
<label for="vp">Verifier PIN Code:</label> <input type="text" size="100" name="vp" id="vp">
<button onclick="javascript:access_token_url(document.getElementById('vp').value)">Get Access Token URL</button>
<br><br>
<label for="at">Access Token URL:</label> <input type="text" size="100" name="at" id="at">
<br><br>
<label for="atr">Access Token Response:</label><br><textarea rows="5" cols="75" name="atr" id="atr"></textarea>
<br>
<button onclick="javascript:parse_response(document.getElementById('atr').value, fetch_profile_url)">Parse Response</button>
<br><br>
<label for="fp">Fetch Profile URL:</label> <input type="text" size="100" name="fp" id="fp">
</body>
</html>
thanks in advance
Heres a full example of login and sending msg linkedIn using Phonegap
ref = window.open('https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=APIKEY&scope=w_messages r_network r_emailaddress r_fullprofile&state=APISECRET&redirect_uri=SOMEACTIVESITE','_blank','location=no');
ref.addEventListener('loadstart', function(e){
$.mobile.loading( 'show' );
if(e.url.indexOf('?code=') >=0 ){
if(e.url.match(/=[^]+&/)){
var code = e.url.match(/=[^]+&/)[0].substring(1).replace('&','');
window.sessionStorage.setItem('code', code);
ref.close();
$.ajax({
url: 'https://www.linkedin.com/uas/oauth2/accessToken?grant_type=authorization_code&code='+code+'&redirect_uri=http://janbeeangeles.com&client_id=jwwwdjplwubu&client_secret=ygMy3EpVcs6IAORE',
success: function(a){
$.ajax({
url : 'https://api.linkedin.com/v1/people/~/mailbox?oauth2_access_token='+a.access_token,
type: 'post',
headers : {
'Content-Type' : 'application/json',
'x-li-format' : 'json'
},
data: JSON.stringify({
"recipients": {
"values": [
{
"person": {
"_path": "/people/~",
}
}]
},
"subject": "asdasdasd on your new position.",
"body": "You are certainly the best person for the job!"
}),
success: function(a){
alert(2222)
},
error: function(a){
alert(JSON.stringify(a))
}
})
},
error: function(a){
alert(JSON.stringify(a))
}
})
}
}
});

Categories

Resources