Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 228554 articles
Browse latest View live

How to check if duplicate key exists in local -storage in ionic


How to check if duplicate key exists in local -storage in ionic

Unexpected token < in JSON at position 80 at JSON.parse ()

$
0
0

Posting a screenshot of your desktop is one of the impolitest things you can do.

Please post the error message as text, include your ionic info output, what code you are running and what JSON the server is returning that causes this error.

Etiqueta

Etiqueta

Runtime error when executing ionic-starter-aws

Runtime error when executing ionic-starter-aws

$
0
0

Thanks a lot! I did not see the issues...

Help with AWS IoT Sample

$
0
0

Looking at the PDF I think the command in there is outdated. This is creating and assuming a Ionic v1 project, the current CLI by default creates a v2+ project. You will need to add --type=ionic1 to the start command to get the right type of project for this to work.


Unexpected token < in JSON at position 80 at JSON.parse ()

$
0
0

lo que muestra en la consola
Notice: Undefined index: Correo in C:\xampp\htdocs\final_slim\api\app\route\auth_route.php on line 13



Notice: Undefined index: Password in C:\xampp\htdocs\final_slim\api\app\route\auth_route.php on line 13

y la linea 13 lo que tengo en el json_encode

$app->group('/auth/', function () {
$this->post('autenticar', function ($req, $res, $args) {
$parametros = $req->getParsedBody();

    return $res->withHeader('Content-type', 'application/json')
               ->write(
                 json_encode($this->model->auth->autenticar($parametros['Correo'], $parametros['Password']))
               );
});

});

Ionic cli 3.4 issue

$
0
0

Also for creating a new project?
What happens if you choose n?

Unexpected token < in JSON at position 80 at JSON.parse ()

$
0
0

Your PHP is broken. $parametros['Correo'], $parametros['Password'] both do not exist, so the code doesn't work.

Ionic cli 3.4 issue

$
0
0

no i updated my existing project project from 2.2.2 to latest.
if i choose n it's noting happen any thing

Ionic cli 3.4 issue

$
0
0

Please create a new project with ionic start to see what happens.

Ionic cli 3.4 issue

$
0
0

Also run ionic info --verbose in your project, then choose "y" when prompted.

Ionic image dont see

$
0
0

<ion-col col-4>
 <img id="cls1" [src]="src1">
</ion-col>

Try that.


I can't parse json ajax data

$
0
0

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Unexpected token < in JSON at position 80 at JSON.parse ()

$
0
0

en el formulario si le quito la etiqueta funciona todo bien , este código lo e usado en otros proyectos y todo bien, pero cuando lo pase ionic v 1 me encontrado con este error .
este es el codigo de mi service que tiene toda la lógica para consumir mi REST API
gracias por la ayuda

angular.module('app.services', [])

.factory('auth', ['$state', function ($state) {
var auth = {
setToken: function (token) {
window.localStorage[API.token_name] = token;
},
getToken: function () {
return window.localStorage[API.token_name];
},

    getUserData: function () {
        console.log(auth);
        try{
            var token = window.localStorage[API.token_name];
            if (token === '') return;

            var base64Url = token.split('.')[1];
            var base64 = base64Url.replace('-', '+').replace('_', '/');
            console.log()
            return JSON.parse(window.atob(base64)).data;
        } catch(err) {
            $state.go('signup');
        }
    },
    logout: function () {
        window.localStorage[API.token_name] = '';
        $state.go('signup');
    },
    hasToken: function () {
        return (window.localStorage[API.token_name] !== '');
    },
    redirectIfNotExists: function () {
        if (!auth.hasToken()) {
            $state.go('signup');
        }
    }
};

return auth;

}])

.service('loader', function () {
this.show = function (show) {
document.querySelector("#loader").style.display = show ? 'block' : 'none';
};
})

.service('restApi', ['$http', 'loader', 'auth', function ($http, loader, auth) {
this.call = function (config) {

    var headers = {};
    headers[API.token_name] = auth.getToken();


    loader.show(true);

    var http_config = {
        method: config.method,
        url: API.base_url + config.url,

        data: typeof (config.data) === 'undefined' ? null : config.data,
        headers: headers
    };


    $http(http_config).then(function successCallback(response) {
        loader.show(false);
        config.response(response.data);

    }, function errorCallback(response) {
        loader.show(false);

        switch (response.status) {
            case 401: // No autorizado
                auth.logout();
                break;
            case 422: // Validación
                config.validationError(response.data);
                break;
            default:
                config.error(response);
                console.log(response.statusText);
                break;
        }
    });
};

}])

I can't parse json ajax data

webpackJsonp not found when running ionic-starter-aws

Unexpected token < in JSON at position 80 at JSON.parse ()

$
0
0

Please edit your post, it is not very readable at the moment.
Use the </> button above the input field to format your code, command line output or error message (select the text first, then click the button or wrap it in ``` manually). Check the preview if it looks better. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.

Viewing all 228554 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>