examples/angular/src/app/chat/chat.component.html
@for (message of chat.messages; track message.id) { @for (part of message.parts; track $index) { @if (part.type === 'text') { {{ part.text }} @if (part.state === 'streaming') { ▮ } } @else if (part.type === 'reasoning') { #Reasoning
{{ part.text }}
} @else if (part.type === 'file') { @if (part.mediaType.startsWith('image/')) { } @else { {{ part.filename ?? part.url }} } {{ part.mediaType }}
} @else if (part.type === 'source-url') { {{ part.title ?? part.url }} Source: {{ part.sourceId }}
} @else if (part.type === 'source-document') {
{{ part.title }}
{{ part.filename ?? part.mediaType }}
} @else if (part.type === 'step-start') { } @else if (isToolPart(part)) {
Tool: {{ part.type.replace('tool-', '') }}
Status: {{ part.state }} @if (part.input !== undefined) {
{{ part.input | json }}
} @if (part.output !== undefined) {
Result
{{ part.output | json }}
} @if (part.errorText) { {{ part.errorText }} } } @else if (isDataPart(part)) {
Data: {{ part.type.replace('data-', '') }}
{{ part.data | json }}
} @else { {{ part | json }} } }
} @if (this.chat.status === 'submitted') {
Waiting...
}
@if (chat.status === 'ready') { Send } @else { Stop }