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

Component encapsulation

Component encapsulation uses a separate template file that looks more or less like every other web templating language you've ever used. By convention, if your component class is in hello.ts, then its template is in hello.html and your component will be <hello/>:

<!-- product-list.html -->
<template>
    <require from="product-detail"/>
    <p>
        <product-detail repeat.for="product of products" product.bind="product"/>
    </p>
</template>
/* producty-list.js */
export class ProductList {
    public products[];
}

Each JavaScript framework has its own way of working, and we can explore more features about each one, but Aurelia has something special—you don't need to go far away from learning how the framework works, and in extreme cases, in their own way/syntax for developing. With Aurelia, you will feel like writing plain JavaScript and HTML code, highly maintainable, scalable, and focusing only on your business purposes.

Now it's time to start working with Aurelia. So, let's explore the Aurelia command line to start our trip. Keep reading!

主站蜘蛛池模板: 略阳县| 广西| 张掖市| 绍兴市| 修武县| 会昌县| 额尔古纳市| 临泉县| 宣武区| 茌平县| 上栗县| 石狮市| 景洪市| 新乡市| 库伦旗| 普兰县| 沈丘县| 察哈| 河津市| 皋兰县| 娄烦县| 长葛市| 普格县| 兴和县| 黑龙江省| 兴安县| 苗栗市| 新化县| 南木林县| 合山市| 白银市| 滕州市| 华宁县| 湘乡市| 福建省| 招远市| 江都市| 阜阳市| 涿州市| 宁武县| 本溪|