Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93350781
add-content.pipe.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
Thu, Nov 28, 03:07
Size
496 B
Mime Type
text/x-java
Expires
Sat, Nov 30, 03:07 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22622333
Attached To
rNIETZSCHEBETAAPP Nietzsche-Beta-App
add-content.pipe.ts
View Options
import { Pipe, PipeTransform } from '@angular/core';
import { Content } from './models';
@Pipe({
name: 'addContent'
})
export class AddContentPipe implements PipeTransform {
transform(index: number, titles: Content[]): string{
//titles.push({ title: title, link: title.replace(/ /g, '_')});
//return title;
console.log(titles.length, index);
if (titles == undefined || titles == null || titles.length <= index) return '';
return '#' + titles[index].link;
}
}
Event Timeline
Log In to Comment