What is Minification ?
It is the process of removing all unnecessary characters from source code without changing its functionality.
If we use normal angular syntax for writing a controller then after minifiying our files it going to break our functionality.
Controller (Before minification) :
After using minification tool, It will be minified as like below.
Here, minification removed unnecessary spaces and the $scope variable from code. So when we use this minified code then its not going to print anything on view. Because $scope is a crucial part between controller and view, which is now replaced by the small 'e' variable. So when you run the application it is going to give Unknown Provider 'e' dependency error.
There are two ways of annotating your code with service name information which are minification safe:
Inline Annotation Syntax
$inject Property Annotation Syntax
After minification, this code will be
Here, angular will consider variable 'a' to be treated as $scope, and It will display output as 'Hello World !'.