Showing posts from February, 2017

Implement CORS Filter Using Springboot

Springboot CORS implementatin in Add below piece of code in your of your spring boot project

 import org.springframework.boot.context.embedded.FilterRegistrationBean; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; import org.springframework.web.filter.CorsFilter;

 public FilterRegistrationBean corsFilter()

 UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();      CorsConfiguration config = new CorsConfiguration();
 source.registerCorsConfiguration("/**", config);

How To Remove Unwanted Div Tags In HTML

Problem Statement :

Html code having unnecessary div tags due to html for loop ,so there is some  invisible empty div's

Solution : By using HTML TemplateBefore Code :
<ul class="items"> <div *ngFor="let config of configs">   <div *ngFor="let group of groups.groups  | objectToArray"><div *ngIf="config.Group==group"><li (click)="onSelect(group,config.Client)">  <span class="badge">{{ group}}</span></li></div>   </div> </div></ul>After Code :  <div class="grid grid-pad"><template ngFor let-config[ngForOf]="configs"> <template  ngFor let-group [ngForOf]= "groups.groups  | objectToArray"> <template [ngIf]="config.Group==group">  <a [routerLink]="['/search',config.Client,group]"  class="col-1-4"><div class="module group">  <h4>{{group}}<…

Primeng Datatable Header Issue And Solution

Primeng Datatable  Header Is Not Working :

 p-header Not working: 

Primeng data table header is not working while using <p-header>List of Cars</p-header>Solution : in component.ts file you have to import import {Header} from 'primeng/primeng'; in html page you have to add .Thats it will work fine .  <header>List of Cars</header> still your primeng datatable header is not working ? Then update your primeng version using the node  command npm install primeng --save