-
Maybe the desire to control is the problem
I love to play tennis. Serve was the biggest weakness in my game. So I practice a lot, and now I am getting better and better in my serve. One of the most important techniques in serving is pronation which I struggled most with until I saw this video, The Serve Pronation Technique And 7 Drills To Learn It. Here is what strike me most in the article.
-
service in angularjs
AngularJs is different from other JavaScript client-side framework in that it use dependency injection to manage its components. Although dependency injection is not a new method, in fact it has been very successful for many years, it is a new approach in JavaScript client-side framework. So if you never use dependency injection in other language before, it is pretty confusing. The following is my notes on this topic.
There are basically two step to develop your angularjs application.
-
package and register your components using module like the following.
-
-
how angularjs bootstrap an application
-
Aliasing angular key concepts
AngularJS is a single page application framework. Although, it never markets itself as a "MVC" framework, it uses lots concept of MVC, like model, view, controller. Once you start using it, you will find the concepts it use does not map 100% to your concepts. So I feel that I need to alias these key concepts to align to my understanding. If you don't understand these concept correctly, you can use them in a wrong way very easily, because AngualrJS allow you to do so. In the following, I try to explain them by giving each of them an alias. Although an alias is not trendy, but at lease it helps me to understand. Hopefully, it helps you too.
-
angularjs-sugar
The normal way to to creating anguarjs component is like the following.
<!– Global variables in JavaScript is evil. However lots Angualrjs example out there use global variable, including some example in the http://angularjs.org/. I am not sure why. But avoiding Global variable is easy in Angularjs. I created a script angularjs-sugar to avoid the global variable.