I’m trying to create an ionic app using firebase with a json file.In this json file should contain an image,name of the image and it’s price.I want to know where the error is.
Here is my index.html
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<style type="text/css">
.platform-ios .manual-ios-statusbar-padding{
padding-top:20px;
}
.manual-remove-top-padding{
padding-top:0px;
}
.manual-remove-top-padding .scroll{
padding-top:0px !important;
}
ion-list.manual-list-fullwidth div.list, .list.card.manual-card-fullwidth {
margin-left:-10px;
margin-right:-10px;
}
ion-list.manual-list-fullwidth div.list > .item, .list.card.manual-card-fullwidth > .item {
border-radius:0px;
border-left:0px;
border-right: 0px;
}
.show-list-numbers-and-dots ul{
list-style-type: disc;
padding-left:40px;
}
.show-list-numbers-and-dots ol{
list-style-type: decimal;
padding-left:40px;
}
</style>
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/routes.js"></script>
<script src="js/directives.js"></script>
<script src="js/services.js"></script>
<!-- AngularFire -->
<script src="https://cdn.firebase.com/libs/angularfire/2.2.0/angularfire.min.js"></script>
<!-- Firebase -->
<script src="https://www.gstatic.com/firebasejs/3.6.4/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyAWcLc-2ITd-gd2E9ZvM5NRI_GAFvdIiJ8",
authDomain: "meuappdb.firebaseapp.com",
databaseURL: "https://meuappdb.firebaseio.com",
storageBucket: "meuappdb.appspot.com",
messagingSenderId: "421732631359"
};
firebase.initializeApp(config);
</script>
<!-- Only required for Tab projects w/ pages in multiple tabs
<script src="lib/ionicuirouter/ionicUIRouter.js"></script>
-->
promoODoDia112018.html
controllers.js
angular.module(‘app.controllers’, [‘ionic’,‘firebase’])
.controller(‘promoODoDia112018Ctrl’, [’$scope’, ‘$firebaseObject’, function ($scope, $firebaseObject) {
var ref = firebase.database().ref();
// download physicsmarie’s profile data into a local object
// all server changes are applied in realtime
$scope.produtos = $firebaseObject(ref.child(‘item’).child(‘produtos’));
}])
.controller(‘maxMapaCtrl’, [’$scope’, ‘$stateParams’, // The following is the constructor function for this page’s controller. See https://docs.angularjs.org/guide/controller
// You can include any angular dependencies as parameters for this function
// TIP: Access Route Parameters for your page via $stateParams.parameterName
function ($scope, $stateParams) {
}])
.controller(‘pRolaMapaCtrl’, [’$scope’, ‘$stateParams’, // The following is the constructor function for this page’s controller. See https://docs.angularjs.org/guide/controller
// You can include any angular dependencies as parameters for this function
// TIP: Access Route Parameters for your page via $stateParams.parameterName
function ($scope, $stateParams) {
}])
My firebase storage