Skip to content
Learn Netverks

Lesson

Step 12/36 33% through track

built-in-directives

Built-in directives

Last reviewed May 28, 2026 Content v20260528
Track mode
client_angularjs
Means
In-browser AngularJS 1.x
Reading
~1 min
Level
intermediate

This lesson

This lesson teaches Built-in directives: the concepts, APIs, and habits you need before advancing in AngularJS.

Directives extend HTML in 1.x—read link/compile when debugging DOM behavior.

You will apply Built-in directives in contexts like: Long-lived intranet apps, government portals, and codebases not yet moved to Angular, React, or Vue.

Write JavaScript for AngularJS 1.8, click Run—register modules/controllers, then mountApp(moduleName, templateHtml) in #ng-app; printOutput feeds the terminal.

When you can explain the previous lesson's ideas without copying starter code.

ng-if, ng-show, ng-class, and ng-style change presentation; ng-repeat and ng-switch structure lists.

Important interview questions and answers

  1. Q: Why does this matter?
    A: ng-if, ng-show, ng-class, and ng-style change presentation; ng-repeat and ng-switch structure lists.

Self-check

  1. Summarize Built-in directives in one sentence.
  2. What would you try next in the playground?

Going deeper

In production AngularJS work, Built-in directives matters when documents, stylesheets, or apps must stay maintainable across teams and releases—not only in isolated demos.

Common pitfalls

Watch for copy-paste configs, skipping validation or tests, and mixing concerns (structure vs presentation vs behavior) in one layer.

Practice

  1. Apply one technique from this lesson in the playground.
  2. Write one interview-style sentence explaining when you would use built-in directives on a real project.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • ng-if vs ng-show?
  • Directive you used?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump