For AngularJS : Prerequisites :: 1) Firstly you need have good hands over on JAVASCRIPT patterns like revealing pattern, prototype pattern, model pattern and prototype revealing pattern. 2) Go through MVC framework concepts how does this works. Taking server side MVC frameworks like MVC3/MVC4.
Going through above steps first will be added advantage while understanding angularjs :: Directives, structure **and work flow.** Greatest source for learning AngularJS concepts ishttps://docs.angularjs.org/guide/concepts
Lastly http://plnkr.co/ this is greatest online tool for editing and running angularjs application.