Tag Archives: snippet

Some awesome snippets from angular-js source code.

I have started going through the angular-js source code trying to understand the internal workings of the same.
Its about 22000 lines of pure magic and an awesome learning experience for new and experienced developers.
Here are some of the gists that I have collected.
BTW, heres the source code : https://ajax.googleapis.com/ajax/libs/angularjs/1.2.24/angular.js
Please feel free to send me any pull requests if you find that the gist could be improved and comment if you have more awesome gists to share !

  1. Cloning an object with multiple nested functions or keys using javascript

  2. Simple function to remove special characters from a string.

  3. Angular: UID function creator

  4. Angular: Simple functions

  5. Simple function to remove special characters from a string.

  6. Angular: Function to calculate the length of string

  7. Angular: Regex to search for html tags

  8. Angular : The actual code behind the magical angular injector dependencies.

Also check out angular-js.in >> A curated list of angular directives.