1. Add safeHtml pipe in helper component to enable view as html of tags and classes added by community managers.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51834 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
fb8d203f41
commit
8ac980308a
|
@ -4,11 +4,13 @@ import 'rxjs/Rx';
|
|||
import {HelperService} from './helper.service';
|
||||
import{EnvProperties} from '../properties/env-properties';
|
||||
import {ConnectHelper} from '../../connect/connectHelper';
|
||||
import {SafeHtmlPipe} from '../pipes/safeHTML.pipe';
|
||||
|
||||
@Component({
|
||||
selector: 'helper',
|
||||
template: `
|
||||
<div *ngIf=" texts && texts.length > 0" [ngClass]=styleName>
|
||||
<div *ngFor="let text of texts " [innerHTML]="text.content">
|
||||
<div *ngFor="let text of texts " [innerHTML]="text.content | safeHtml">
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
|
|
|
@ -7,7 +7,7 @@ import { FormsModule } from '@angular/forms';
|
|||
import {HelperComponent} from './helper.component';
|
||||
// import {HelperServiceModule} from './helperService.module';
|
||||
import {HelperService} from './helper.service';
|
||||
|
||||
import {SafeHtmlPipe} from '../pipes/safeHTML.pipe';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -15,7 +15,8 @@ import {HelperService} from './helper.service';
|
|||
// RouterModule//,HelperServiceModule
|
||||
],
|
||||
declarations: [
|
||||
HelperComponent
|
||||
HelperComponent,
|
||||
SafeHtmlPipe
|
||||
],
|
||||
providers:[HelperService],
|
||||
exports: [
|
||||
|
@ -34,4 +35,3 @@ export class HelperModule{
|
|||
// };
|
||||
// }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue