Templates

Parts of your template content seems to be missing entirely. Or, you see the error: "This content region does not match any available templates.", when you think that it should.

This could be due to incorrect use of a self-closing tag. The browser may have interpreted this as a start tag and incorporated other HTML markup within that tag.

http://www.w3schools.com/tags/ref_byfunc.asp
Reference of valid tags. Those that can be self-closing are shown as <tag />.

http://dusan.fora.si/blog/self-closing-tags
Discussion of self-closing tags.

You request a template via "Template.load()", and see that the request was successful, but your page content does not render and the template is not injected into the DOM.

It may be that you have requested to load the template too early. Make sure you are calling "Template.load()" after the DOM is ready.

Control attribute has no value even though a value was specified.

The attribute in the HTML markup may be a problem in some versions of IE if the name is not all lower case. Bottom line: use "foo:myattribute" instead of "foo:myAttribute".

Model

A property's value doesn't update after setting it.

This may happen if you accidentally bypass the property setter. For example, if you object has a property called "Foo", then...

obj.Foo = "bar";

...will not update the object correctly. Instead you should use...

obj.set_Foo("bar");

While debugging you should see a message in the console warning you of incorrect property setter usage.

Last edited Jul 19, 2010 at 1:35 PM by mattheyan, version 12

Comments

No comments yet.