I read somewhere that with ng-show comes performance issues when rendering a page so to combat that I realized I could use $element dependency to improve performance.
This actually frees you from using NG-IF and NG-SHOW
In the controller

In the  view

<div class="wrapper">

This is a remote computer

</div>
<p>




app.controller('myController',function($scope,$element){
var magDiv = $element.find(".wrapper");
magDiv.hide();
$scope.someEventHereLikeNg-click= function () {
magDiv.show();
};
});

Easy, Cheesy and Peasy.

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!


As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.

LEAVE A REPLY

Please enter your comment!
Please enter your name here