fix recursing directories for angular templates & add root option