我坚持将自定义组件导入Ionic 3中的页面.这在Ionic 2中相对微不足道,但我似乎无法在Ionic 3中使用它.
我有一个名为现有页面模块other.经过运行ionic g component test,我导入自动生成的ComponentsModule进入other.module.ts,并把它添加到imports阵列.
import { ComponentsModule } from "../../components/components.module";
@NgModule({
declarations: [
OtherPage,
],
imports: [
IonicPageModule.forChild(OtherPage),
ComponentsModule,
],
})
export class OtherPageModule {}
Run Code Online (Sandbox Code Playgroud)
然后我将组件选择器添加到页面中<test></test>.
这会导致错误:
polyfills.js:3 Unhandled Promise rejection: Template parse errors:
'test' is not a known element:
1. If 'test' is an Angular component, then verify that it is part of this module.
2. To allow any element add 'NO_ERRORS_SCHEMA' to …Run Code Online (Sandbox Code Playgroud) 我有一台正在运行的 Mac macOS 10.13.1。安装Homebrew成功后,我尝试Node.js安装
brew install node
Run Code Online (Sandbox Code Playgroud)
安装似乎在终端中顺利完成,但随后进行了版本检查;
node -v
Run Code Online (Sandbox Code Playgroud)
结果是
-bash: node: command not found
Run Code Online (Sandbox Code Playgroud)
有关如何解决此问题的任何指示?我试图避免必须从二进制文件安装节点。
我有一个 React Native 应用程序,我正在尝试发布到 App Store。
在 XCode 中,9.4.1当我进入 时Product>Archive,项目归档成功,但Organizer窗口未打开。
手动打开Organizer视图Window>Organizer会显示该项目,但该项目没有存档。
检查默认Archives目录显示存档已创建,但未显示在Organizer
我尝试过的一些解决方案包括
Build Settings设置Skip Install为NoSchemes其设置为React并勾选Shared该方案。Installation Directory是/Applications关于如何解决这个问题有什么想法吗?
我想在 thunk 中获取存储在状态中的值,在本例中为projectId。我可以在调用操作时访问该值而不将其作为参数传递吗?
interface RepoDetailsState {
openIssuesCount: number
error: string | null
}
const initialState: RepoDetailsState = {
openIssuesCount: -1,
error: null,
projectId: 'someProjectId'
}
const repoDetails = createSlice({
name: 'repoDetails',
initialState,
reducers: {
// ... reducers ...
}
})
export const {
getRepoDetailsSuccess,
getRepoDetailsFailed
} = repoDetails.actions
export default repoDetails.reducer
export const fetchIssuesCount = (
org: string,
repo: string
): AppThunk => async dispatch => {
//How do I access projectId from state?
}
Run Code Online (Sandbox Code Playgroud)