dnet40/modules/uoa-services-portal/trunk/sample-components/sampleComponent-rc4/src/app/common/publicationTitleFormatter.component.ts @ 45529
1 |
import {Component, Input} from '@angular/core'; |
---|---|
2 |
|
3 |
//Usage Example "<publication-title [title]="X" [url]="X" > </publication-title>"
|
4 |
|
5 |
@Component({ |
6 |
selector: 'publication-title', |
7 |
template: ` |
8 |
<div class="publication-title">
|
9 |
<h5 *ngIf="url" ><a target="_blank" href="{{url}}" >{{title}}</a></h5>
|
10 |
<h5 *ngIf="!url" >{{title}}</h5>
|
11 |
</div>
|
12 |
`
|
13 |
})
|
14 |
|
15 |
export class PublicationTitleFormatter { |
16 |
@Input() title: string[]; |
17 |
@Input() url: string[]; |
18 |
|
19 |
constructor () {} |
20 |
|
21 |
ngOnInit() { |
22 |
|
23 |
}
|
24 |
|
25 |
|
26 |
}
|
- « Previous
- 1
- 2
- 3
- 4
- Next »