what is the Template.templateName.rendered= function(){} in
what is the Template.templateName.rendered= function(){} in Meteor js
这是我的第一个流星项目,我试图了解流星本身在同一时间。现在我遇到了以下语法:
Template.editor.rendered = function() {
// some stuff here
}
虽然我已经在网上看了,但我找不到这种函数是什么。我的意思是,我想知道我应该在这个函数里面放些什么,这个函数什么时候会被调用?例如,如果我有一个像localhost:3000/test
这样的url,当我在浏览器中输入这个url时,这个动作会调用Template.test.rendered= function()
吗?
rendered
回调类似于jQuery中的ready()
或香草Javascript中的DOMContentLoaded
。
注册一个函数,当这个模板的实例被插入到DOM中时调用。
使用此方法添加的回调函数在模板的实例中调用一次。myTemplate第一次呈现为DOM节点并放入文档中。
相关文章:
- javascript multiple if in function
- draw() function of Processing in Javascript
- Is it good to make function in function using 'return
- Call a function from a <a> tag in javascript?
- Jquery If/Then in Click Function?
- Dynamics Variable (variable++) in Append function DOM Javasc
- Javascript: argument unpacking in function.prototype.bind()?
- $(function () { } in javascript/Jquery 中的意思是什么
- AngularJS Access $scope in function
- checkbox onclick function in another function
- $ sign in JavaScript function
- Function Expected In IE7 & IE8
- JS function in Brython
- apply() / call() vs [function]() in jquery
- java.lang.Double.longBitsToDouble function in JavaScript
- what is the Template.templateName.rendered= function(){} in
- Angular Function not Called in <span> tag
- Variable function names in Require & Backbone
- Javascript eval in function
- 如何修复“;return not in function”;firebug上显示的错误