我使用mat-tree与mat-nested-tree-node在角6.我想要的是,当用户切换展开图标可以动态加载数据.
使用材料示例中Flat Tree给出的动态数据示例,我尝试使用相同的概念.这是我到目前为止尝试过的https://stackblitz.com/edit/angular-naarcpNested Tree
但它只显示数据阵列中预先填充的数据,尽管在控制台中很明显数据正在更新但它永远不会在UI上显示.
它以递归方式调用_getChildren节点的方法,parent, child1, child2, child3因为这是初始数据.我加入My Child中child1和child3当用户展开,但从未中所示的添加节点.
我无法添加动态子进程,_getChildren因为它会被递归调用直到最后一个节点.
我不想使用平树,因为它管理的单一阵列中的一切和更新单个阵列中的数据的异步加载变得非常困难
我有什么遗漏或嵌套树是这样设计的吗?
安装特定应用程序时,错误弹出窗口显示错误:由于错误,无法下载"appname".(从服务器检索信息时出错.[RPC:S-2:AEC-2])
我已经尝试过了
1)重启设备
2)来自谷歌播放服务的清晰数据
2)删除谷歌帐户并再次同步
问题是,每个其他应用程序都在顺利安装和更新.我相信这个特定的应用程序有问题(而不是谷歌播放.如果我错了,请告诉我).在相同错误代码的链接上找到类似的问题,但没有解决方案.
我正在构建一个 angular 5 应用程序,但在玩路线时遇到了麻烦......
我有 2 个主布局,每个布局都有如下子路由:
SiteLayoutComponent - HomeComponent AppLayoutComponent - ContactComponent
我的问题是默认路由,当应用程序第一次加载时,使用空 URL,路由器必须重定向到 Home 组件,它有子路由“SiteLayoutComponent”,这里的问题是它只加载了 HomeComponent 但不是具有<navbar-component>. 它仅在浏览器中输入 /home 时有效。以下是我的路线:
const appRoutes: Routes = [
{
path: '',
redirectTo: 'home',
pathMatch: 'full'
},
//Site routes goes here
{
path: 'home',
component: SiteLayoutComponent,
children: [
{
path: '',
component: HomeComponent
}
]
},
//App routes goes here
{
path: 'app',
component: AppLayoutComponent,
children: [
{ path: 'contact', component: ContactComponent }
]
},
//No layout routes
{
path: …Run Code Online (Sandbox Code Playgroud) single-page-application angular-routing angular-components angular