As per mentioned, Is it possible to assign $scope
variable from ng-init
to new variable?
see this plunkr
If you see on my plunker, variable $scope.adulttotTicket
have value of total ticket which is 13
. I create new variable using ng-init called totTicket
and assign it to $scope.adulttotTicket
<p data-ng-init="totTicket = $scope.adulttotTicket"></p>
but when I output value totTicket
, I got value 0
totTicket: {{ totTicket }}
#note point of this question is, I want to assign new variable with value $scope variable
Anyone have any Idea would appreciate, thanks!