Starting controller to work with domain from javascript