- Hands-On Full Stack Web Development with Aurelia
- Diego Jose Argüelles Rojas Erikson Haziz Murrugarra Sifuentes
- 76字
- 2021-06-25 20:58:18
Dependency injection
The dependency injection framework requires more configuration. In contrast to Aurelia, Angular requires you to specify the HTML selector and template, increasing the file complexity. Aurelia will detect the template based on a name strategy:
@Injectable() class Ticket { /* */ } @Component({ selector: 'ticket', providers: [Ticket], template: `...` }) //Configuration code mixed with business class export class Sale { constructor(private ticket: Ticket) {} public activate() { // do something... this.ticket.toast("Sale processed!"); } }
推薦閱讀
- 異構(gòu)基因共表達(dá)網(wǎng)絡(luò)的分析方法
- 重新定義Spring Cloud實(shí)戰(zhàn)
- 萬(wàn)物互聯(lián):蜂窩物聯(lián)網(wǎng)組網(wǎng)技術(shù)詳解
- Socket.IO Real-time Web Application Development
- Mastering JavaFX 10
- Windows Server 2012 Hyper-V虛擬化管理實(shí)踐
- 工業(yè)互聯(lián)網(wǎng)創(chuàng)新實(shí)踐
- 互聯(lián)網(wǎng)+思維與創(chuàng)新:通往未來(lái)的+號(hào)
- 設(shè)備監(jiān)控技術(shù)詳解
- 現(xiàn)代通信系統(tǒng)(第5版)
- 5G智慧交通
- 從物聯(lián)到萬(wàn)聯(lián):Node.js與樹莓派萬(wàn)維物聯(lián)網(wǎng)構(gòu)建實(shí)戰(zhàn)
- 物聯(lián)網(wǎng)商業(yè)設(shè)計(jì)與案例
- Learning IoT with Particle Photon and Electron
- Scala Programming Projects