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

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! :)

主站蜘蛛池模板: 增城市| 沾化县| 东港市| 夹江县| 汝州市| 崇义县| SHOW| 博乐市| 清远市| 阿拉尔市| 内乡县| 特克斯县| 灵璧县| 三门县| 富平县| 萍乡市| 永善县| 邢台县| 开封县| 伽师县| 周至县| 平遥县| 台州市| 西华县| 大连市| 蓬莱市| 南雄市| 新邵县| 遂平县| 涟水县| 湖北省| 绵阳市| 三亚市| 汕头市| 通州市| 甘肃省| 洛扎县| 登封市| 满洲里市| 大渡口区| 镇康县|