Weave Analyst Notes : #1

Weave Analyst Notes : #1

Purpose of these notes is to serve as personal logs as i continue modifying the Weave Analyst.
Weave Analyst

ng-if VS ng-show

So my angular app was taking longer than i expected it to load yesterday. It was a tiny app, not more than say 50 lines. Turns out i was running into an issue with ng-if.

ng-if does something depending on the true or false evaluation of its expression.

Turns out ng-if removes or recreates an element from the DOM, and recreates the DOM tree from scratch.
Every removal destroys the old scope and every recreation creates a new one. Not good if ng-model and ng-if together are inheriting something from the parent scope. Not good at al!!

On the other hand ng-show and ng-hide simply modify the CSS(namely the display property) of the DOM element. The element is never destroyed.

Additional documentation : ng-If

Comments

Popular posts from this blog

Accessing Coursera learning material offline

d3 Collapsible tree vertical

Fixing $env.TOMCAT_HOME directory creation in eclipse