import { Component } from '@angular/core';
import { DownFileDirective } from '@yelon/abc/down-file';
import { NzButtonModule } from 'ng-zorro-antd/button';
@Component({
selector: 'components-down-file-simple',
template: `
@for (i of fileTypes; track $index) {
<button nz-button down-file [http-data]="data" http-url="./assets/demo{{ i }}" file-name="demo中文" class="mr-sm">
{{ i }}
</button>
}
`,
standalone: true,
imports: [DownFileDirective, NzButtonModule]
})
export class ComponentsDownFileSimpleComponent {
fileTypes = ['.xlsx', '.docx', '.pptx', '.pdf'];
data = {
otherdata: 1,
time: new Date()
};
}