Not sure how to populate an array within a method that has Promises within it

I have a method that performs some basic mathematical calculations in my Ionic app after fetching data from SQLite DB. I want to show these results on a page but the problem is that I am not sure how to put all these calculated values in an object array. I tried following but the editor is complaining about not resolving promises. To me it looks like I already resolved them by extracting a numeric value from each and assigning them to local variables such as grossMarketable, aphMarketable, amountSold and totalContractDollarAmount. home.ts user-crop.ts (code snippet of UserCropProvider) CalcModel.ts Answer Create a

“ng-click” not working out of “ion-content” in Ionic framework

I have an input box with the ng-model attribute in my ionic based application. The code inside the ion-content tag: And in the footer-bar I have this: The alert result is undefined. NOTE: when I put the button inside the ion-content it works fine. (It means js codes works fine) Any idea? Answer The reason behind your problem is, ion-content directive does create a child scope which is prototypically inherited from the parent scope. So by placing myNumber in input ng-model does get added inside the scope of ion-content, which is different that the controller myNumber number scope variable. To

Ionic Framework: $scope is undefined in simple alert

This is my code… I don’t know how to explain but it always say undefined when I enter something on the text box… but $scope.goaltitle = “something” is working on the .controller(); … Answer Short Answer The root cause of this issue is, ion-content does create a prototypically inherited child scope, that’s why goaltitle(primitive type) of controller scope is different than the goaltitle you are using on ng-model Ideally practice is to follow dot rule while defining view model. So that prototypal inheritance rule will get followed with scope hierarchy. You should define object and then do assign all the