I am having trouble understand the \'ngRepeat\' directive so I wish to learn how angularjs works by writing a \'double\' directive and then extending with an \'ntimes\' directiv
The ng-repeat
directive is mainly used to iterate over items on lists/arrays/collections (i.e. ng-repeat="item in list"
) and does much more than simply cloning elements. Please take a look at angularjs ng-repeat directive documentation.
If you really just want to clone elements, try something like this: http://jsfiddle.net/hp9d7/