ionicthemes / ionic6-starter-app

🌟 Ionic Starter Template. It has everything you need to jump start your Ionic Angular app development! Firebase Integration, Capacitor, PWA, Lists, Cards, Navigation, Forms and Validations and SO MUCH MORE! 🚀
https://ionicthemes.com/templates/ionic5-full-starter-app-pro-version
63 stars 33 forks source link

[issue] How to add and properly link additional entries in details.json... #1

Closed ppkantorski closed 5 years ago

ppkantorski commented 5 years ago

Hello,

I am having trouble adding in and correctly calling upon the corresponding details in my program based upon the Ionic 4 Full Starter App template. For instance, when viewing the “Categories” section and clicking on “Food,” you are given a selection of restaurants. However when clicking on any of the restaurants, it will take you to the same restaurant details regardless of which restaurant you click. This appears to be the case for every entry in the Categories page. I tried to add details for the 2nd and 3rd restaurant in the details.json file, but that changes the structure of how it should be called. I tried making an items list in the details.json as follows:

{ “items”: [ { “id”: 1, … }, { “id”: 2 … }, { “id”: 3, … } ] }

but I cant seem to link the /app/categories/food/RESTAURANT_NAME to the corresponding data properly.

djabif commented 5 years ago

Because this is a starter app, and not a final app for production, we use static data that we store in local json files.

Using these json files we simulate a real database that we query through the services. However, for a production app it is recommended that you use a real database.

If you still want to use our json structure, I have updated a new version of the template with this implemented. So, now if you go to food listing, every restaurant will load its specific details. To get the new version just re download the file from your account at ionicthemes.

You can try it in https://ion4fullpwa.firebaseapp.com/app/categories/food (make sure to clear your browsers cache before)

Please contact us if you need further assistance or if you have any issue getting the latest version of the app.