- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2019 12:55 PM
I figured it out...everything was correct except this line in my client script:
c.data = {};//needed to remove this
this was clearing the data object and that's why the popup modal was showing blank for this...I had that in there from a previous function and forgot to delete when I moved to the popup modal.
So the HTML script for the popup modal was correct. (The {{c.data.count}} was already being defined in my server script)
<!--popup modal-->
<script type="text/ng-template" id="modalTemplate">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Hello</h4>
</div>
<div class="panel-body wrapper-xl">
Thank you, a ticket has been created on your behalf. You are number {{c.data.count}} in the queue. You will now be redirected to the Tech Hub home screen.
</div>
</div>
</div>
</script>
<!--end popup modal-->
and this was the final bit of the Client script to trigger the popup modal.
c.server.update().then(function(response){
//popup modal
c.modalInstance = $uibModal.open({
templateUrl: 'modalTemplate',
scope: $scope
});
//end popup modal
}
}
thanks again for your help Asifnoor!