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

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!

主站蜘蛛池模板: 汤阴县| 雷山县| 黑山县| 汤阴县| 柘荣县| 林西县| 屏东县| 孝昌县| 连山| 宁明县| 林口县| 广汉市| 武定县| 滨州市| 甘肃省| 肇东市| 仪陇县| 陕西省| 大化| 呼伦贝尔市| 乐至县| 仲巴县| 新蔡县| 攀枝花市| 迁安市| 房山区| 七台河市| 蒙山县| 三穗县| 台前县| 临安市| 林甸县| 交口县| 阜城县| 肇州县| 卓尼县| 通渭县| 黔西县| 双鸭山市| 凤庆县| 惠东县|