Hi,
so far I was successful to build my first Framework7 app - easier than I expected
But with one problem I always hit the wall. Presumably a consequence of my limited javascript experience but maybe someone can help me.
In the result of a request I need to call another method or have access to Framework7.
For example after retrieving some data from a server with Framework7.request I want to call a function loginOK. This is not possible because loginOK is not recognized. Directly calling router.navigate(β/β); is also not possible.
<script>
export default {
methods:
{
signIn() {
var $ = this.$;
var app = this.$app;
var router = this.$router;
var username = $('input#demo-username-2').val();
var password = $('input#demo-password-2').val();
var param = {'username': username, 'password': password};
app.request.json('//localhost:8081/4DAction/W_CheckPassword', param, function(data){
loginOK(data)});
},
loginOK(data){
var $ = this.$;
var app = this.$app;
var router = this.$router;
if (data.success){
router.navigate('/');
β¦
What do I miss?