Register angular.module and MainCtrl, then mountApp(moduleName, templateHtml) to bootstrap in #ng-app; use printOutput for terminal values.
Recommended workflow
- Read the concept before editing code.
- Click Run in browser.
- Use
printOutput(...)for terminal inspection. - For UI:
var app = angular.module('playgroundApp', []);thenmountApp('playgroundApp', '<div>...</div>');
Important interview questions and answers
- Q: Why does this matter?
A: Register angular.module and MainCtrl, then mountApp(moduleName, templateHtml) to bootstrap in #ng-app; use printOutput for terminal values.
Self-check
- Summarize Playground workflow in one sentence.
- What would you try next in the playground?
Challenge
First run
- Run default code.
- Confirm
angular.versionprints.
Done when: terminal shows AngularJS version string.