本周末我正在搞乱mongodb和node.js,我在通过关于更新嵌套对象/文档的mongodb文档时遇到了一些麻烦.
我有一个文件看起来像这样的集合..
{
gameName: "string",
slug: "string",
players: [{playerName, playerScore}, ...]
}
Run Code Online (Sandbox Code Playgroud)
我试图找出如何根据playerName增加playerScore的值.
我想这主要归结于我不理解NoSQL方法.我甚至对于为玩家使用阵列有了第二个想法,所以任何输入都会受到赞赏.
谢谢!
使用Angular 2 beta.0
我有一个像这样的组件结构
App (Has RouteConfig)
-> List
| -> ListItem (Want to use RouterLink from here)
Run Code Online (Sandbox Code Playgroud)
这会导致错误: Component "List" has no route config.
所以我在这个List组件上放了一个RouteConfig ......
@RouteConfig([
{path: '/:id', name: 'Details', component: Detail}
])
Run Code Online (Sandbox Code Playgroud)
但我得到一个像角度的错误 Error: Child routes are not allowed for "/list". Use "..." on the parent's route path.
我尝试在该路由配置中的/ list路径之前和之后添加这3个点...但没有成功.
路由器上的文档很轻,虽然我知道这应该是基于ui-router,我没有看到并行添加嵌套路由