AngularJs has taken the industry by storm and has been high on our list of recommended technologies for web apps and component based workflows. In this series, we are going to introduce, directives in angularjs with a “learn more widget”, going over some techniques to jump start your next enterprise project. That we are going to cover.
1. What are Directives and how to use them
2. Adding interactivity to your widget
3. Styling Directives
4. Templating
AngularJS directives are a powerful tool in creating enterprise based solutions. From this example you can quickly see how we can reuse, build and expand on our learn more directive. The link function allowed us to bootstrap our directive by adding the events we need as well as ensure the correct css classes are either present or added. By using isolated scopes, we were able to make sure each instance of or directive was unique and can contain its own set of values. While our usage of the templates feature, allowed us to keep the markup centralized and removed the need for complicated setups.
Your new post is loading...