Use $http instead of <script> injection.

Removing $rootScope.$apply was necessary to stop an error about two
$apply/$digest commands at once.