'use strict'; /** * @ngdoc overview * @name domainManagerApp * @description * # domainManagerApp * * Main module of the application. */ angular .module('domainManagerApp', []) .controller('WhoisController',['$scope', '$http', function ($scope, $http) { $scope.domain = "" $scope.showResult = false $scope.lookup = function(){ $http({ method: 'GET', url: 'http://localhost:9292/' + $scope.url }).success(function(data) { console.log("Domain Lookup Successfull") console.log(data) if(!$scope.$$phase) { $scope.$apply(function(){ $scope.domain = JSON.stringify(data, null, 4); $scope.showResult = true }); } else { $scope.domain = JSON.stringify(data, null, 4); $scope.showResult = true } }); } }])