mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-24 17:43:45 +03:00
19 lines
531 B
TypeScript
19 lines
531 B
TypeScript
|
'use strict';
|
||
|
import { Component, Input, ChangeDetectionStrategy, OnInit } from '@angular/core';
|
||
|
import { BaseComponent, SpecManager } from '../base';
|
||
|
|
||
|
@Component({
|
||
|
selector: 'redoc-externalDocs',
|
||
|
template: `<a *ngIf="docs" [href]="docs.url" [innerHtml]="docs.description | marked"></a>`,
|
||
|
changeDetection: ChangeDetectionStrategy.OnPush
|
||
|
})
|
||
|
export class ExternalDocs implements OnInit {
|
||
|
@Input() docs;
|
||
|
|
||
|
ngOnInit() {
|
||
|
if (this.docs && !this.docs.description) {
|
||
|
this.docs.description = 'External Docs';
|
||
|
}
|
||
|
}
|
||
|
}
|