fix broken 'sample' directive; allow to dynamically declare controllers