mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-23 00:56:33 +03:00
Add trackBy to tags
This commit is contained in:
parent
a671d2f005
commit
81d06316ed
|
@ -1,5 +1,5 @@
|
||||||
<div class="methods">
|
<div class="methods">
|
||||||
<div class="tag" *ngFor="let tag of data.tags">
|
<div class="tag" *ngFor="let tag of data.tags;trackBy:trackByTagName">
|
||||||
<div class="tag-info" [attr.tag]="tag.name">
|
<div class="tag-info" [attr.tag]="tag.name">
|
||||||
<h1 class="sharable-header"> <a class="share-link" href="#tag/{{tag.name | encodeURIComponent}}"></a>{{tag.name}} </h1>
|
<h1 class="sharable-header"> <a class="share-link" href="#tag/{{tag.name | encodeURIComponent}}"></a>{{tag.name}} </h1>
|
||||||
<p *ngIf="tag.description" [innerHtml]="tag.description | marked"> </p>
|
<p *ngIf="tag.description" [innerHtml]="tag.description | marked"> </p>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { Component, provide } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
inject,
|
inject,
|
||||||
async,
|
async,
|
||||||
|
|
|
@ -46,4 +46,8 @@ export class MethodsList extends BaseComponent {
|
||||||
trackByPointer(idx, el) {
|
trackByPointer(idx, el) {
|
||||||
return el.pointer;
|
return el.pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trackByTagName(idx, el) {
|
||||||
|
return el.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user