简体   繁体   English

流星JS中Atmosphere JS的模板

[英]Template from Atmosphere JS in Meteor JS

I'm just getting started with Meteor JS and have looked into some packages on Atmospherejs.com. 我刚刚开始使用Meteor JS,并在Atmospherejs.com上研究了一些软件包。 I've come across packages like accounts-ui/accounts-facebook/etc. 我遇到过诸如account-ui / accounts-facebook / etc之类的软件包。 I have found related files of these packages in my projectRoot/.meteor/local/build/programs/server and projectRoot/.meteor/local/build/programs/web.browser. 我在projectRoot / .meteor / local / build / programs / server和projectRoot / .meteor / local / build / programs / web.browser中找到了这些软件包的相关文件。

I do this in my main html file, and I believe this is a template. 我在我的主要html文件中执行此操作,并且我相信这是一个模板。

{{> loginButtons}} {{> loginButtons}}

Now, I also believe that a template is a piece of HTML. 现在,我也相信模板是一段HTML。 I've gone through various folders/directories created in my project directory and didn't find any template related to this 'loginButtons'. 我浏览了在项目目录中创建的各种文件夹/目录,但没有找到与此“ loginButtons”相关的模板。 Where exactly is the template for loginButtons is coming from? loginButtons的模板到底是哪里来的?

loginButtons模板在accounts-ui包中定义

The package provides you with some helper functions. 该软件包为您提供了一些帮助功能。 Actually, as you can see from the way you call it in the template {{> loginButtons}}. 实际上,从您在模板{{> loginButtons}}中调用它的方式可以看出。 The package makes for you some ready functionalities for your templates. 该软件包为您提供了一些准备好的模板功能。 The best way to configure each package layout or functions is to have a look on the documentation provided in github or on the package page on atmosphere.js. 配置每种程序包布局或功能的最佳方法是查看github中提供的文档或atmoism.js的程序包页面。 You can configure the accounts packages layout and functions according to your preferences by using Accounts.ui.config . 您可以使用Accounts.ui.config根据自己的喜好配置帐户软件包的布局和功能。 For example you could add extra fields to the form: 例如,您可以在表单中添加其他字段:

Accounts.ui.config({
    passwordSignupFields: "USERNAME_AND_EMAIL"
  });

If you want to configure the layout of other packages have a look on the css classes of the source provided on github and configure them in your css. 如果要配置其他软件包的布局,请查看github提供的源代码的CSS类,并在CSS中进行配置。 So you do not need to find the files in your application. 因此,您无需在应用程序中查找文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM