[英]How can I pass data between two views in Aurelia?
我有两个视图, logo
和folder
, logo
folder
夹调用,我要检查文件夹是否为空,以便将某些内容发送到徽标视图中。
logo.html
<template>
<require from="company-assets/folders"></require>
<folders resourcetype="logo" loadresources.bind="bindedLoadResources"
isloading.bind="bindedIsLoading" rootitems.bind="rootResources" if.bind="!searchQuery">
</folders>
<ul class="row logos list" if.bind="resourcesList.items.length">
<logo repeat.for="logo of resourcesList.items" item.bind="logo"></logo>
</ul>
<div if.bind="resourcesList.items.length==0 &&
!resourcesList.isLoading || folders.resourcetype" >
<assest-emptyscreens></assest-emptyscreens>
</div>
</template>
folder.html
<template>
<ul class="row folders list mb-30 mt-10" if.bind="!isLoading && hasFolders">
<folder if.bind="resourcetype" repeat.for="folder of foldersList.items"
item.bind="folder" loadfoldercontent.bind="bindedGoToFolder"
isloading.bind="bindedIsLoading" deletedfolder.bind="bindedDeletedFolder">
</folder>
</ul>
<div if.bind="!hasFolders && isRoot && !isLoading" >
Empty
</div>
</template>
我将从文件夹中获取“空”来签入徽标
通常,有两种方法可以在组件之间传递数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.