tabalinas / jsgrid-php

Sample project for jsgrid with PHP REST-service
MIT License
91 stars 48 forks source link

Error running php #19

Open marcobra opened 7 years ago

marcobra commented 7 years ago

Cannot get sample running

Error in file public/js/sample.js at line 7

countries.unshift({ id: "0", name: "" });

TypeError: countries.unshift is not a function

also please write internal links using relative path i mean change i.e:

<link href="/public/css/style.css" rel="stylesheet" /> to <link href="./public/css/style.css" rel="stylesheet" />

Tanks Marco

tabalinas commented 7 years ago

TypeError: countries.unshift is not a function

This is the working sample the way it is. Are you sure you didn't change the source? countries should be an array which supports unshift method. Probably you have changed the result of the /countries path.

also please write internal links using relative path i mean change i.e:

why should we do that?