Component-based directive construction in AngularJs