I have discussed about the scope of a directive in my previous article. Here we’re going to see how to use the link and controller functions of an AngularJs directive.
Call and Apply, makes sense. Who is Mr.Dave ?
Last week, I came across a situation while working on a simple AngularJS application. I’d to sync the data between multiple open tabs. As you guess, the easy way to sync data between multiple tabs is through local storage. Ofcourse there are better ways of doing this using websockets; but here I am going to explain the client-side way –– using local storage and real time updating other tabs.
I feel AngularJS documentation is baffling sometimes. Reason may be, I’m going through the same learning curve described by @bennadel. Through this article, I’m primarily aiming to help those who got stuck at some point of the curve. Don’t take it too seriously; I’m just sharing some of my experiences with AngularJS.
What are Directives
Directives are one of the most powerful features of AngularJS. You can imagine them as building blocks ( aka re-usable components ) of any AngularJS application. Mastering all the directives, is totally out of this article’s scope. For that, I would really recommend this book; it covers everything you need to know about directives. Here, we’ll discuss one aspect of directives called : “Directive scope”.
The assignment expressions are always evaluated from right-to-left. So what the above expression actually does is, assign the value
10 to the variable
d, then assign the value of
c and so on.
On the other day, while exploring the Github repositories, this one grabbed my attention.
I like this idea so much. In fact, I also were trying to build something similar. Writing regular expressions were always a tedious task for me. I’ve tried learning it enormous times, but still when I want to construct one, I’ve to google around.
A good blogging platform is one which allows easy customization. I’ve been using Octopress for more than 2 weeks and happy to tell that it’s one of those allows customization with out any pain. I want to share a tweak I added to my blog recently : It’s an author information section below every post. Let’s see how I built it and added to my blog.
Take your own time to come up with an answer before moving to the next section.
Finally Octopress !!
I wanted to start writing blog ever since I started coding. I never had a success setting it up because of time constraints and many other reasons. During this time, I’ve evaluated a number of blogging platforms and eventually I thought of using wordpress as my blogging platform when I start my blog.
Now finally I’m having some time. I decided to spend some time everyday dedicating to my blog. So first thing I need to do is setting up a wordpress blog with default template.
I started browsing to find a good theme for the wordpress blog before setting up anything. While browsing, I opened paulirish.com and saw that he’d recently switched his blog to some new blogging software called Octopress.