Hi, im evaluating the Kendo Mobile UI with application framework to develop a hybrid app for Android and IOS.
Im using application Framework, separating classes using .js files.
The problem is that visual studio 2013 intellisense doesnt provide any help for class constructor (for example when i wrote new User() intellisense dont suggest the constructor parameters defined).
any idea?
/*
User = kendo.data.ObservableObject.extend({
init: function(username,nombre,apellido,email){
this.username = username;
}
});
*/
EXAMPLE FILES:
app.js
login.js
user.js
Thanks!
Im using application Framework, separating classes using .js files.
The problem is that visual studio 2013 intellisense doesnt provide any help for class constructor (for example when i wrote new User() intellisense dont suggest the constructor parameters defined).
any idea?
/*
User = kendo.data.ObservableObject.extend({
init: function(username,nombre,apellido,email){
this.username = username;
}
});
*/
EXAMPLE FILES:
app.js
var
app =
new
kendo.mobile.Application($(document.body), {
user :
null
,
loginService:
null
,
skin:
'flat'
,
transition:
'slide'
,
initial :
"views/account/login.html"
,
init:
function
() {
this
.loginService =
new
LoginService();
if
(
this
.loginService.loadLocalCredential())
this
.initial =
'views/home/index.html'
;
}
});
login.js
LoginService = kendo.data.ObservableObject.extend({
username:
""
,
password:
""
,
isLoggedIn:
false
,
login:
function
() {
var
that =
this
;
var
url =
'http://url/Account/Login?username='
+
this
.username +
'&password='
+
this
.password;
$.ajax({
url: url,
dataType:
"json"
,
success:
function
(data, textStatus, jqXHR) {
if
(data.result ==
true
) {
var user = new User(username,nombre,apellido,email); /* when i write new User() intellisense doesnt provide any help*/
that.set(
"isLoggedIn"
,
true
);
app.navigate(
"./views/home/index.html"
);
}
}
});
},
logout:
function
() {
this
.clear();
app.navigate(
'./views/home/index.html'
);
},
clear:
function
() {
this
.set(
'username'
,
''
);
this
.set(
'password'
,
''
);
this
.set(
'isLoggedIn'
,
false
);
},
loadLocalCredential:
function
() {
this
.set(
'username'
,
'geoorge'
);
this
.set(
'password'
,
'1231'
);
this
.set(
'isLoggedIn'
,
true
);
}
});
user.js
User = kendo.data.ObservableObject.extend({
username:
""
,
nombre:
""
,
apellido:
""
,
email:
""
,
isLoggedIn:
false
,
init:
function
(username,nombre,apellido,email){
this
.username = username;
this
.nombre = nombre;
this
.apellido = apellido;
this
.email = email;
}
});
Thanks!