dnet40/modules/uoa-services-portal/trunk/src/app/landingPages/showTitle.component.ts @ 43487
1 |
import {Component, Input} from '@angular/core'; |
---|---|
2 |
import {Router, ROUTER_DIRECTIVES} from '@angular/router-deprecated'; |
3 |
|
4 |
|
5 |
@Component({ |
6 |
selector: 'showTitle', |
7 |
template: ` |
8 |
<h2 *ngIf="title != undefined">
|
9 |
<div *ngIf="title['url'] != undefined">
|
10 |
<a class="custom-external" href="{{title['url']}}" target="_blank">
|
11 |
<div [innerHTML]="title['name']"></div>
|
12 |
</a>
|
13 |
</div>
|
14 |
<div *ngIf="title['url'] == undefined">
|
15 |
<div [innerHTML]="title['name']"></div>
|
16 |
</div>
|
17 |
</h2>
|
18 |
`
|
19 |
,
|
20 |
directives: [ |
21 |
...ROUTER_DIRECTIVES |
22 |
]
|
23 |
})
|
24 |
|
25 |
export class ShowTitleComponent { |
26 |
@Input() title: { [key: string]: string }; |
27 |
|
28 |
constructor (private _router: Router) { |
29 |
console.info('title constructor'); |
30 |
}
|
31 |
|
32 |
ngOnInit() { |
33 |
}
|
34 |
}
|