What is the difference between Run() and Use() methods in IApplicationBuilder?

* Use() method: Used to create a simple middleware which can be "chained" to other functions over the pipeline. Takes two arguments: RequestDelegate ...


What is the difference between parseInt() and number()?

parseInt() and Number() are both used to convert a string into a number. * parseInt() parses the value of the string and converts to number till th ...


How can you work with cookies in Angular?

To work with Cookies, we can make use of the CookieService which is a part of the ngx-cookie-service module. * Install: `npm install --save ngx-coo ...


What is the difference between double equals (==) and triple equals (===) ?

In JavaScript, double equal operator (==) stands for value compare. The operands on either sides are converted into a common type and are compared for ...


What are tree shakeable providers?

When we register providers in @NgModule(), angular internally includes all those related classes in the final bundle, irrespective of their actual use ...


What are Pure Pipes and Impure Pipes?

Pipes by default are "Pure" - they can't detect changes when a value of the primitive type or the reference of the complex type changes. Example: when ...


What are Async Pipes?

Async Pipes help transforming data coming from an Observable and resolve into desired dataset. It also takes care of the Subscription and Unsubscripti ...


What are Hot Observables and Cold Observables?

* Cold Observables are observables where data is produced _inside_ the Observable. It can be treated as a _unicast_. ``` const obs$ = new Obserabl ...


What is the difference between a Component and a Directive?

__Directive:__ * Directives help in modifying the behavior of an existing DOM element or adding new behavior to the DOM. * Directives are created by ...


What is the difference between ng build and ng serve?

* ___ng build___ command builds the angular application and generates the build artifacts which are saved under the /dist folder in the application di ...


What are the different Guards present in Angular?

Guards in Angular help us in controlling access to certain routes of our application, unless a criteria is matched. Angular provides the following int ...


How do you create an Interceptor? It is a service or class?

We can create by implementing the _HttpInterceptor_ interface from _@angular/common/http_ package. We register it to be attached to the HTTP request p ...


How can you pass a header to all the http requests created from an angular app?

We can read an outgoing HTTP request from an angular application and modify it to always pass a particular header, such as an Authorization header car ...


How do you detect browser in JavaScript / jQuery?

In JavaScript, we can get the browser information by means of the window.navigator object. ``` #properties# window.navigator.appName window.navi ...


How can you protect your JS files in angular?

We can make the code unreadable to some extent by means of minification and uglify, but since angular works completely on the client end, we can't com ...


We use cookies to provide you with a great user experience, analyze traffic and serve targeted promotions.   Learn More   Accept