1 | import { IHtmlEngineHelper } from './html-engine-helper.interface';
|
2 |
|
3 | export class RelativeURLHelper implements IHtmlEngineHelper {
|
4 | public helperFunc(context: any, currentDepth: number, options): string {
|
5 | switch (currentDepth) {
|
6 | case 0:
|
7 | return './';
|
8 | case 1:
|
9 | case 2:
|
10 | case 3:
|
11 | case 4:
|
12 | case 5:
|
13 | return '../'.repeat(currentDepth);
|
14 | }
|
15 |
|
16 | return '';
|
17 | }
|
18 | }
|