Hi I am developing web application in angularjs. I have implemented print functionality. I am binding values to view using scope variables. When i click first time on print my values are not binding. When i click second time all my values will bind. Below is the print functionality.
$scope.Print = function () {
if ($scope.period == null) {
toastr.error($filter('translate')('Please select Year.'));
}
else {
$scope.vehiclepriceprint = $cookieStore.get("carpriceprint");
$scope.downpaymentprint = $cookieStore.get("downpayment");
}
First time also i will be having values in cookie but not binding to view. Whenever i click second time on print button everything will be working Below is the print button.
<input type="button" value="{{'Print' | translate}}" class="blue-button" ng-click="Print()" id="btnPrint">
Below is the html code of print.
<span id="lblDownPayment">{{downpaymentprint}}</span>
<span id="lblFinancialAmount">{{vehiclepriceprint}}</span>
May i know what is the issue i am facing here? Any help would be appreciated. Thank you.