正如标题所说,有没有一种方法可以以编程方式渲染(到 DOM 元素中)角度组件?
例如,在 React 中,我可以使用它将ReactDOM.render组件转换为 DOM 元素。我想知道 Angular 中是否有类似的东西?
使用 Gatsby 插件时有没有办法动态进行 graphQL 查询gatsby-source-filesystem?
例如,我希望完成以下任务:
return (
<StaticQuery
query={graphql`
query chartQuery {
all${fileKey}Json { <------- Is this a thing?
nodes {
name
data
color
}
}
}
`}
Run Code Online (Sandbox Code Playgroud)
理想情况下,我想将 fileName 作为 prop 传递。