Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F75812744
content.component.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Aug 4, 10:51
Size
830 B
Mime Type
text/x-java
Expires
Tue, Aug 6, 10:51 (2 d)
Engine
blob
Format
Raw Data
Handle
19614381
Attached To
rNIETZSCHEBETAAPP Nietzsche-Beta-App
content.component.ts
View Options
import { Component, Input, OnInit } from '@angular/core';
import { ActivatedRoute, Params } from '@angular/router';
import { Link } from './models';
@Component({
selector: 'content',
templateUrl: './content.component.html',
styleUrls: ['./content.component.css']
})
export class ContentComponent implements OnInit {
@Input() content: string|Link;
text: string;
@Input() links: Link[] = [];
queryParams: Params;
constructor(private activatedRoute: ActivatedRoute ) { }
ngOnInit() {
this.activatedRoute.queryParams.subscribe( (queryParams: Params ) => {
this.queryParams = queryParams;
});
if (this.links.length == 0){
if(typeof this.content == 'string'){
this.text = this.content;
} else {
this.links = [ this.content ] ;
}
}
}
}
Event Timeline
Log In to Comment