官术网_书友最值得收藏!

Generating custom resources

Aurelia, like many JavaScript frameworks, allows you to create reusable components that help you avoid writing duplicated code, reuse your component in multiple parts of your app, and also export them as plugins to reuse them in other projects.

Aurelia allows you to generate the reusable pieces of code utilizing the following templates:

  • Components
  • Custom elements
  • Custom attributes
  • Binding-behaviors
  • Value-converters

These templates are all located in our project root folder in the aurelia_project/generators folder. For example, the following command generates a custom Aurelia element:

au generate element my-reusable-element

The source code will be generated in the src/resources/{type} folder depending on the type you selected.

Each type will be discussed in the following chapters, so don't feel bad if you don't understand the differences between them. Keep reading my friend! :)

主站蜘蛛池模板: 秭归县| 弥渡县| 正定县| 军事| 兴义市| 长阳| 潮州市| 五寨县| 汝州市| 武威市| 滨海县| 吴川市| 西充县| 博客| 信宜市| 宁都县| 兴化市| 射洪县| 浑源县| 社会| 凤冈县| 平原县| 秀山| 曲周县| 天祝| 抚顺县| 朝阳区| 墨江| 西和县| 衡南县| 宝山区| 清苑县| 道孚县| 许昌县| 城市| 甘肃省| 宿迁市| 抚顺县| 镇赉县| 凤山县| 酒泉市|