Front End Developer (AngularJS) Question: Download Questions PDF
Explain how will you show/hide buttons and enable/disable buttons conditionally?
Answer:
Using the ng-show and ng-disabled directives.
<div class="dataControlPanel"
ng-show="accounts.releasePortfolios">
<div class="dataControlButtons">
<button class="btn btn-primary btn-small"
ng-click="saveComments()" ng-disabled="disableSaveButton">Save</button>
<button class="btn btn-primary btn-small"
ng-click="releaseRun()" ng-disabled="disableReleaseButton">Release</button>
</div>
</div>
<div class="dataControlPanel"
ng-show="accounts.releasePortfolios">
<div class="dataControlButtons">
<button class="btn btn-primary btn-small"
ng-click="saveComments()" ng-disabled="disableSaveButton">Save</button>
<button class="btn btn-primary btn-small"
ng-click="releaseRun()" ng-disabled="disableReleaseButton">Release</button>
</div>
</div>
Download Front End Developer (AngularJS) Interview Questions And Answers
PDF
Previous Question | Next Question |
Explain me your workflow when you create a web page? | Tell me what is the difference between == and ===? |