Moved code from ngEmbed directive to function in top closure to separate logic from angular directive declaration.
Moved code from ngEmbed directive to function in top closure to separate logic from angular directive declaration.

ritz078/ngEmbed,ritz078/ngEmbed,ritz078/ng-embed