I'm creating a new Ionic app using Backand to host the data. I want to present a list of all the instruments I have in a database. Here's my presentation code:
<!-- Create tabs with an icon and label, using the tabs-positive style.
Each tab's child <ion-nav-view> directive will have its own
navigation history that also transitions its views in and out. -->
<ion-tabs class="tabs-icon-top tabs-color-active-positive">
<ion-tab title="Instruments" icon="ion-home"href="#/tabs/dashboard">
<ion-nav-viewname="tab-dashboard"></ion-nav-view>
</ion-tab>
<ion-tab title="Login"icon="ion-log-in"href="#/tabs/login">
<ion-nav-viewname="tab-login"></ion-nav-view>
</ion-tab>
</ion-tabs>
And my Instrument service is:
service('InstrumentsModel', function ($http, Backand) {
var service = this, baseUrl = '/1/objects/', objectName = 'items/';
functiongetUrl() {
return Backand.getApiUrl() + baseUrl + objectName;
}
functiongetUrlForId(id) {
return getUrl() + id;
}
service.all = function() {
return $http.get(getUrl());
};
// rest of the service here
})
The problem I'm seeing is that I don't think I've hooked the code up correctly. How do I get my app to use my InstrumentsModel data service?"