Using AngularJS, I want to access scope variable from inside a <script type="text/ng-template"
.
<script type="text/ng-template" id="firstDialogId">
<div class="ngdialog-message" align="center" id="download">
<h4 ng-show=isFrench>Télécharger la cartographie</h4>
<h4 ng-show=isEnglish>Download cartography</h4>
<a href="../downloads/PDF/{{currentLanguage}}/{{currentCartography}}.pdf" download>
<img src="../style/images/pdf-icon.png" alt="Download PDF" width="30%" height="30%">
</a>
<a href="../downloads/VSD/{{currentCartography}}.vsd" download>
<img border="0" src="../style/images/vsd-icon.png" alt="Download VSD" width="30%" height="30%">
</a>
<a href="../downloads/PNG/{{currentLanguage}}/{{currentCartography}}.png" download>
<img border="0" src="../style/images/PNG-icon.png" alt="Download PNG" width="30%" height="30%">
</a>
<div class="ngdialog-buttons">
<button type="button" class="ngdialog-button ngdialog-button-primary" ng-click="closeThisDialog('button')">Close</button>
</div>
</div>
</script>
isFrench
and isEnglish
are 2 booleans from my controller.
Same for currentCartography
and currentLanguage
, they are strings from my controller.
I also tried with getter inside and outside of the controller, same result.
...
` is not working. `...
` is always true, regardless the value of isFrench Also, since i wasnt sure how to use it, I also tried `...
` but same, always true. – Ellone Apr 08 '15 at 14:07...
` with or without quotes is always false. – Ellone Apr 08 '15 at 14:17