Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code improvement #4

Closed
Wolfr opened this issue May 25, 2013 · 1 comment
Closed

Code improvement #4

Wolfr opened this issue May 25, 2013 · 1 comment
Labels

Comments

@Wolfr
Copy link
Owner

Wolfr commented May 25, 2013

We are using ng-show as a nested IF structure. Can we improve this code?

<div ng-show="deviceOrientation">
    <div ng-show="deviceChoice">

        <!-- Display selected device here -->
        <img style="-webkit-transform: scale({{deviceSize}});" ng-show="deviceChoice" src="images/{{ deviceOrientation | lowercase }}/{{ deviceChoice | removewhitespace | lowercase }}.png">

        <!-- Display label here -->
        <p><span ng-show="deviceChoice">{{ deviceChoice }} - {{ deviceOrientation }}</span></p>

    </div>
</div>
@ghost ghost assigned rubenv May 25, 2013
@Wolfr
Copy link
Owner Author

Wolfr commented May 25, 2013

Not relevant anymore but I guess ng-show="deviceOrientation && deviceChoice"

@Wolfr Wolfr closed this as completed May 25, 2013
@Wolfr Wolfr unassigned rubenv Oct 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants