NG directives: fixes

Allow functions to be defined for template/templateUrl and array notation in controller

There's not a more elegant solution that I know of until we get structs in TS anyway.
Merge pull request #1158 from georgiosd/patch-2

NG directives: fixes