June 2018
Intermediate to advanced
348 pages
8h 19m
English
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!"); } }
Read now
Unlock full access