我有一个带有数据绑定图像源的模态轮播。第一次打开它时,所有内容都能正确显示,但是当我再次打开模型时,轮播消失了,我也不知道为什么。
我试图拥有一个我的项目的画廊,当我单击一个项目时,您会看到一个带有项目图片和简短介绍的轮播。 该项目是使用Angular完成的。
>>> def swap(first_obj, second_obj):
... second_obj[:], first_obj[:] = first_obj, second_obj
...
>>> first = [1, 2, 3]
>>> second = [4, 5, 6]
>>> first_content = first[:]
>>> second_content = second[:]
>>> swap(first, second)
>>> print(first, second_content, first == second_content)
[1, 2, 3] [4, 5, 6] False
>>> second, first_content, second == first_content)
[1, 2, 3] [1, 2, 3] True
@Component({
selector: "app-tester",
templateUrl: "./tester.component.html",
styleUrls: ["./tester.component.scss"]
})
export class TesterComponent implements OnInit {
selection = 0;
items = [
{
title: "Personal Website",
tags: "#HTML5 #CSS3 #Angular #Javascript",
content:
"Lore Ipsume Lore Ipsume Lore Ipsume Lore Ipsume Lore Ipsume Lore Ipsume Lore Ipsume",
github:
"https://github.com/PatrickHallek?tab=repositories/PersonalWebsite",
preview:
"https://images.unsplash.com/photo-1453928582365-b6ad33cbcf64?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1352&q=80",
src: [
"assets/Images/project/gif-calendar/login.png",
"assets/Images/project/gif-calendar/full.png",
"assets/Images/project/gif-calendar/edit.png",
"assets/Images/project/gif-calendar/link.png"
]
}
];
constructor() {}
selectionPicker(i) {
this.selection = i;
}
ngOnInit() {}
}