我正在使用角度材料显示一系列图像。我想在ngfor内的特定索引处显示div / component
def autoencoderBrainModel(seq_len):
input_shape = Input(shape=(1, seq_len))
u2 = Embedding(vocabulary_size, 10, input_length=seq_len)(input_shape)
u3 = LSTM(150, return_sequences=True)(u2)
u4 = LSTM(150, return_sequences=True)(u3)
l2 = Embedding(vocabulary_size, 10, input_length=seq_len)(input_shape)
l3 = LSTM(150, return_sequences=True)(l2)
l4 = LSTM(150, return_sequences=True)(l3)
m1 = Concatenate([u4, l4], axis=1)
m2 = LSTM(300,return_sequences=True)(m1)
u5 = LSTM(150, return_sequences=True)(m2)
l5 = u5
u6 = LSTM(150, return_sequences=True)(u5)
l6 = LSTM(150, return_sequences=True)(l5)
m4 = Concatenate([u6, l6], axis=1)
out = Dense(seq_len, activation='softmax')(m4)
model = Model(out)
return model
sequence = [5206, 1878, 1224, 2, 329, 89, 106, 901, 902, 149, 8]
# reshape input into [samples, timesteps, features]
sequence = array(sequences[2]).reshape((1, 11, 1))
model = autoencoderBrainModel(11)
model.fit(sequence, sequence, epochs=1000, verbose=0)
在单击特定图像时,我想在图像下方显示图像细节组件,下一行应向下滑动
答案 0 :(得分:0)
我几乎可以实现我想要的。以下是更改
<div #cardPicture fxLayout="row wrap" fxLayout.xs="column" fxLayoutGap="1%" fxLayoutAlign="left">
<div class="imageGrid" *ngFor="let image of images; let i = index">
<mat-card matTooltip="{{image.Name}}" class="card-picture" (click)="onViewDetail(image, i)">
<img mat-card-image src="{{image.Imagebyte}}">
<div class="name">{{image.Name}}</div>
</mat-card>
<div class="details" id="viewImageDetail" *ngIf="i==index">
<app-update-image-detail [imageDetail]="viewImageDetail"></app-update-image-detail>
</div>
</div>
</div>
如果有人有任何答案,请随时发布