Angular

Angular 2+ shows nice looking custom alerts and messages

Angular2 Toasty component shows growl-style alerts and messages for your application. Installation : npm install ng2-toasty –save Import : import {ToastyModule} from \’ng2-toasty\’; Add this tag to the component HTML : <ng2-toasty [position]=\”\’top-center\’\”></ng2-toasty> Import ToastyModule.forRoot() in the NgModule of your application. The forRootmethod is a convention for modules that provide a singleton service. @NgModule({     imports: [         BrowserModule,         ToastyModule.forRoot()     ],     bootstrap: [AppComponent] }) Import the module to your …

Angular 2+ shows nice looking custom alerts and messages Read More »

When we use !important exception and why we use it

The important the rule is used on a style declaration and this declaration overrides any other declarations. Although technically !important has nothing to do with specificity, it interacts directly with it. Using!important, however, is not good practice and should be avoided. Because it does debug more difficult by breaking the natural cascading in your stylesheets. When two conflicting declarations with …

When we use !important exception and why we use it Read More »