I have this code in my angular js controller .
angular.module('IpadAppApp')
.controller('Mortgage_LoanCtrl', function ($location, $scope, $http, $modal, $sce) {
var host = 'http://localhost:3000';
var applicantID;
$scope.submit_info = function(size) {
$http.post(url, data, { withCredentials: true, headers: { 'Accept': 'application/javascript', 'Content-Type': 'application/x-www-form-urlencoded;'} })
.success(function (caseID) {
var modalInstanceSubmit = $modal.open({
templateUrl: 'views/mortgage_loan/home_loan_thank_you.html',
controller: 'Mortgage_LoanCtrl',
size: size
});
applicantID = caseID;
})
};
$scope.thank_you_page = function(thank_you_page_data) {
return $sce.trustAsHtml(thank_you_page_data);
};
I want to pass the applicantID into my html page
<div class="ls-case-id"> Your case ID is: {{applicantID}} </div>
But it is not passing any data i then tried
In my home_loan_thank_you.html
<p ng-bind-html='thank_you_page(bodyinfo)'></p>
Also passing empty data. So how do i pass applicantID to view or how can i delcare global variables in angularjs controller. I have tried the option of putting above my module or controller declaration and also not putting var in front of the variable name but all to no avail works.
Thanks