This is simply if else condition which will update html DOM elements as you need.
But more clarification this is not completely differ from ngShow or ngHide. Because this is not updating DOM elements actually.
What this does is remove existing CSS and newly adding CSS as recreated DOM. This case ngIf will completely remove the scope of DOM and reinitialize it.


Hash Map

HashMap is one of the most performing data structure in java collection framework. This provides constant time for both insertion and retrieval. This is used for large scale data since this is having high performance in insertion and retrieval. However this performance is depending on the two factors such as initial capacity and load factor. We can construct HashMap in four way and default constructor is having load factor is .75 and initial capacity as 16.


Singleton Design Pattern

This is the pattern which ensures there will be only one instance of a class in JVM and it can be accessed via globally. Generally this pattern is used to be on caching, logging, settings and configurations and so on.

Static class has below properties such as : –

  1. Static Member – this keeps the instance of class.
  2. Private constructor – this avoids creating multiple instances from this class.
  3. Static public method – the only one instance can be accessed via globally through this method.