Saturday 15 May 2010

Aurelia view-model class naming -


In Aurelia, when the name of the exported model-model class happens? HTML and JS files are added in the name but there is no mention in the name of the inside class.

By default, the loader first starts catching the exported class because the name of the visual-model does not matter in the orbit. This 'ValueConverter' identifies the suffix, but in addition to the first-class exported win.

Is this from the conference?

Naming does not matter at all for the viewing model. However, a visual model should be the only export from a module that does not use a conference or does not provide metadata. Generally, this is the only export, but you can get others, provided they provide metadata or use a traditional name.

Views of the exports are only related to looking at resources: Custom elements, Attached behavior, Template controllers and Value converters When you import a resource into a view, the compiler will need to know that What type of resource is it that you can provide this information with metadata or you can rely on naming conventions. Therefore, if the name of a class is named FooCustomElement, then it will be known that this export is a custom element. Also for AttachedBehavior, TemplateController and ValueConverter.

In addition, if a visual resource does not provide a metadata and the naming convention does not follow, the compiler will assume that it is a custom element.


No comments:

Post a Comment