In any distributed system with multiple services it is essential to implement logging functionality. You want to know how your system behaves and how services performing. And it would be nice to have a convenient way to review and analyze logs. You can filter these logs by different parameters, indentify problems, create charts and dashboards […]
Unity container is a lightweight dependency injection container. It manages creation and resolution of objects that we registered based on life time that we specified. Here is a list of lifetime managers that exist in Unity.
Scopes and their inheritance is something you will frequently be dealing with in AngularJS applications. This is especially true in the context of directives, as they are subject to the scopes they are inserted into and, therefore, require careful management in order to prevent unexpected functionalities. Fortunately, AngularJS directives afford several robust tools that help […]
We can create custom directives whenever the built-in directives don’t meet our needs, when we want create reusable functionality. So, in this post I’ll explain how to create simple custom directives.
Filters are created by the Module.filter method, which takes two arguments: the name of the filter that will be created and a factory function that creates the worker function that will undertake the actual work. For example The filter is called labelCase and it formats string so that only the first letter is capitalized. Later, […]
The AngularJS support for form validation is based on directives that replace the standard HTML elements like form and input. You don’t have to do anything to use the directives for form elements. AngularJS applies them automatically when it encounters form, input, select, and textarea elements. The directives provide AngularJS features for forms seamlessly, and […]
The ng-controller directive can nested in HTML elements to create an effect known as controller inheritance. This is a feature that aims to reduce code duplication by letting you define common functionality in a parent controller and use it in one or more child controllers.
According to Mozilla Developer Network: Closures are functions that refer to independent (free) variables. In other words, the function defined in the closure ‘remembers’ the environment in which it was created. Another short description: Whenever you see the function keyword within another function, the inner function has access to variables in the outer function. That […]