Learn
Why is creating your own directives useful?
- Readability. Directives let you write expressive HTML. Looking at index.html you can understand the app’s behavior just by reading the HTML.
- Reusability. Directives let you create self-contained units of functionality. We could easily plug in this directive into another AngularJS app and avoid writing a lot of repetitive HTML.
Instructions
1.
In the controller, there is a new property $scope.forecast
. Display this property in the view by creating another <div class="card">
element containing an <app-info>
element.
Take this course for free
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.