我想让我的用户登录/注册我的Meteor/Ionic应用程序.我认为这很容易,因为我使用简单的{{> loginButtons}},但它Uncaught Error: No such template: loginButtons在控制台中给我一个错误.我的代码是
<div class="bar bar-footer">
<button class="button button-clear">{{> loginButtons}}</button>
<div class="title">Start using!</div>
<button class="button button-clear">{{> loginButtons}}</button>
Run Code Online (Sandbox Code Playgroud)
当然,我已经安装了所有必需的软件包(例如meteoric:ionic通过社交网络的auth软件包).那么我怎么能这样做呢(我对这些东西都是新手)?任何帮助将不胜感激,谢谢.
目前我正在开发一个基于Meteor的项目作为后端,React作为前端.我真的很喜欢简单,直到我删除insecure包并且必须处理Meteor方法.现在我需要执行一个基本的插入操作,我只是被卡住了!我有一个表单作为组件(如果最终我想使用此表单不仅用于插入项目,而且还用于编辑这些项目)这里是我的代码:
AddItemForm = React.createClass({
propTypes: {
submitAction: React.PropTypes.func.isRequired
},
getDefaultProps() {
return {
submitButtonLabel: "Add Item"
};
},
render() {
return (
<div className="row">
<form onSubmit={this.submitAction} className="col s12">
<div className="row">
<div className="input-field col s6">
<input
id="name"
placeholder="What"
type="text"
/>
</div>
<div className="input-field col s6">
<input
placeholder="Amount"
id="amount"
type="text"
/>
</div>
</div>
<div className="row">
<div className="input-field col s12">
<textarea
placeholder="Description"
id="description"
className="materialize-textarea">
</textarea>
</div>
</div>
<div className="row center">
<button className="btn waves-effect waves-light" type="submit">{this.props.submitButtonLabel}</button>
</div>
</form>
</div>
);
}
}); …Run Code Online (Sandbox Code Playgroud)