new recursive template, and added the $outScope variable, a way for use the intern methods of the controller, when there's no mongoDB in computer