Architecture and general layout

Beschreibung

A-Level Angular Notiz am Architecture and general layout, erstellt von James Drummond am 04/05/2015.
James Drummond
Notiz von James Drummond, aktualisiert more than 1 year ago
James Drummond
Erstellt von James Drummond vor mehr als 9 Jahre
7
0

Zusammenfassung der Ressource

Seite 1

Controllers, directives and unit testing Should I put methods in the directive or the controller?Thinking through how you're going to unit test things will force you to think carefully about whether to put a method in a directive or the controller.In general, methods related to business logic, navigation, etc. should be in the controller (and the directive can inherit them)A directive is concerned with the view / DOM. If you're testing a method in a directive you should be testing it's changes to the DOM.

Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Angular Nuts and Bolts
James Drummond
Angular application scaffolding
James Drummond
Angular-hint
James Drummond
ng-model-options
James Drummond
Angular controlleras syntax
James Drummond
Quiz - Object Oriented Javascript
arunram.krish
Examen Fundamentos Basicos de Programación
Jose Valderrama0721
Test I. Introduction to web technologies
Angel Martínez Rodriguez
Angular
Kingsley Bawuah
The Princeton Review Chapter 9 Rotational Motion
Anibal Santamaria
JavaScript Fundamentals
Andrew Watters