In Angular 1, directives are a way for developers to extend HTML. This means
introducing new behaviours to the DOM via custom tags or attributes. You can
change what a directive matches by using the
restrict option. By default it
is set to
'EA', meaning it works on elements (tags) and attributes.
There’s been a lot of discussion on what Flux is, the different variations, and
how the pattern can be improved upon. I’ve even blogged about Flux
here on this blog!
Flux is an application
first introduced by Facebook in May 2014, and it has since
them and many ways to invoke them. Throw in
this, and things really starts to
Angular 1.3.0 (superluminal-fudge) has been released!
In a previous post, I presented a framework on top
of AngularJS 1.2 to handle asynchronous form validations and error message display concerns. This has been made
much easier in AngularJS 1.3!
One of the new features coming to ECMAScript 6 (ES6), the next version of
template strings are creating multiline strings, and doing string interpolation.
Throughout your adventures with Angular, you will undoubtedly come across situations where custom directives make sense.
These situations typically involve DOM manipulations, or calling a jQuery plugin.
AngularJS has been instrumental in changing the way I develop web applications. From building imperative views where
both business logic and user interaction live, to separate controllers and directives that handle both requirements
respectively. From sharing components through jQuery plugins, the usual common denominator, to sharing components
through declarative HTML. From reacting to model changes through events, to wiring up the HTML to react to model
changes. The list goes on.
Just when you think that you're in control,
Just when you think that you've got a hold,
Just when you get on a roll,
Here it goes, here it goes, here it goes again.
OK Go - Here It Goes Again
One of the main benefits of Angular is the ability to easily extend HTML with new behaviours through the use
of custom directives. Directives allow developers to match markers in the DOM with the intended behaviours.