Math Order of Operations Error AngularJS with Ionic Framework

I've been using Ionic Framework for about 4 months or so and am still learning the ropes to AngularJS. I'm trying to have Angular perform a calculation but it will not compute the correct way (does not appear to follow order of operations). The info binds fine between Angular and HTML because I've done several other calculations with this app I'm making. Here's what I got:

.controller('CalcCtrl', ['$scope', function($scope){

//Initial Strike Water Requirements
    $scope.startingWater = "";
    $scope.lbsOfGrain = "";
    $scope.grainTemp = "";
    $scope.targetTemp = "";
    $scope.iniStrikeCalc = function(){
        $scope.r = $scope.startingWater/(4*$scope.lbsOfGrain);
        $scope.iStrikeResult = (.2/$scope.r)*($scope.targetTemp-$scope.grainTemp)+$scope.targetTemp;
    };
}])

I input the following values
startingWater = 5
lbsOfGrain = 10
grainTemp = 70
targetTemp = 155
The actual answer should be 163.5
The ionic calculated answer is 8.5

When I analyzed the iStrikeResult formula, it appeared to me that the last term, + $scope.targetTemp was not factored into the end of the equation. I don't know why this is happening.

Also, any good resources (books??) for learning the intricacies of Angular would be appreciated. I've worked through several courses on codecademy and that has helped much.

Please forgive any forum etiquette I may break. This is my first post.


Here is the html I'm using

<div class="list card">
            <div class="item stable-bg">
                <h2 align="center">Initial Strike Water Calculator</h2>
                <p></p>
            </div>
            <div class="item item-body" align="left" ng-controller="CalcCtrl">
                <label class="item item-input">
                        <span class="input-label"><b>Initial Gallons of Water</b></span>
                        <input type="tel" placeholder="5 gal" ng-model="startingWater">
                    </label>
                    <label class="item item-input">
                        <span class="input-label"><b>Pounds of Grain Required</b></span>
                        <input type="tel" placeholder="10 lbs" ng-model="lbsOfGrain">
                    </label>
                    <label class="item item-input">
                        <span class="input-label"><b>Initial Temperature of Dry Grain</b></span>
                        <input type="tel" placeholder="70 &deg; F" ng-model="grainTemp">
                    </label>
                    <label class="item item-input">
                        <span class="input-label"><b>Target Temperature of Mash</b></span>
                        <input type="tel" placeholder="155 &deg; F" ng-model="targetTemp">
                    </label>
                    <label class="item item-output">
                        <span class="text"><b>Required Infusion Water Temperature</b></span>
                        <span class="result" placeholder="Ex. 170 &deg; F"><b>&nbsp &nbsp &nbsp &nbsp{{iStrikeResult}} &deg; F</b></span>
                    </label>
                    <p></p>

                        <button class="button icon ion-beer" ng-click="iniStrikeCalc()">&nbsp Calculate</button>  
            </div>
        </div>


Thanks to everyone for your insights. I'll post the code then explain.

HTML changes

<div class="list card">
            <div class="item stable-bg">
                <h2 align="center">Initial Strike Water Calculator</h2>
                <p></p>
            </div>
            <div class="item item-body" align="left" ng-controller="CalcCtrl">
                <label class="item item-input">
                        <span class="input-label"><b>Initial Gallons of Water</b></span>
                        <input type="number" placeholder="5 gal" ng-model="startingWater">
                    </label>
                    <label class="item item-input">
                        <span class="input-label"><b>Pounds of Grain Required</b></span>
                        <input type="number" placeholder="10 lbs" ng-model="lbsOfGrain">
                    </label>
                    <label class="item item-input">
                        <span class="input-label"><b>Initial Temperature of Dry Grain</b></span>
                        <input type="number" placeholder="70 &deg; F" ng-model="grainTemp">
                    </label>
                    <label class="item item-input">
                        <span class="input-label"><b>Target Temperature of Mash</b></span>
                        <input type="number" placeholder="155 &deg; F" ng-model="targetTemp">
                    </label>
                    <label class="item item-output">
                        <span class="text"><b>Required Infusion Water Temperature</b></span>
                        <span class="result" placeholder="Ex. 170 &deg; F"><b>&nbsp &nbsp &nbsp &nbsp{{iStrikeResult}} &deg; F</b></span>
                    </label>
                    <p></p>

                        <button class="button icon ion-beer" ng-click="iniStrikeCalc()">&nbsp Calculate</button>  
            </div>
        </div>



.js changes

  //Initial Strike Water Requirements

  $scope.iniStrikeCalc = function(){
    $scope.startingWaterQt = $scope.startingWater*4;
    $scope.r = $scope.startingWaterQt/$scope.lbsOfGrain;
    $scope.rby2 = .2/$scope.r;
    $scope.iStrikeResult = ((($scope.targetTemp - $scope.grainTemp)*($scope.rby2)) + $scope.targetTemp);



What I did was change all "tel" values from the HTML input tag from type="tel" to type ="number". I dont know why but this helped make all the complex math I've had throughout my code in other functions work better. Basic algebra was not an issue but with compound fractions, some functions did not work well.

Another thing that I did was to delete all variables which were initialized to a "" value in my .js file. I was wanting to declare the variable before I used it but I believe that this is done when the function is called. I had a few misbehaving functions in my program and after trying these two changes in my trouble areas, things work like a charm.

Thank you all very much!!