Directives ऐसी क्लासेस हैं जो DOM में तत्वों को व्यवहार जोड़ते हैं या उन्हें संशोधित करते हैं। Angular के तीन प्रकार हैं: components (template के साथ directives), structural directives (DOM लेआउट बदलते हैं), और attribute directives (उपस्थिति/व्यवहार बदलते हैं)।
Structural directives — DOM संरचना को बदलते हैं
वे तत्वों को जोड़ते या हटाते हैं, और से पूर्वनिर्धारित होते हैं:
