     $log.debug newLoc
     $location.replace().path newLoc
 
+  $log.debug $routeParams
+
   methodMatches = (m) ->
-    m.HTTPMethod is $routeParams.method and m.URI is $routeParams.servicePath
+    (m.HTTPMethod is $routeParams.method) and (m.URI is $routeParams.servicePath)
 
   initMethod = (m) ->
     m.active = true

  unless $scope.endpoint
    return $log.warn 'Endpoint not found', currentEndpoint

  if httpMethod? and path?
    $scope.currentMethod = m for m in $scope.endpoint.methods when methodMatches m
  else
    $scope.currentMethod = $scope.endpoint.methods[0]

    m.content = body?.example

  methodWatch = (s) ->
    {HTTPMethod, URI} = s.currentMethod
    HTTPMethod + URI

  currentEndpoint = $routeParams.endpointName
  $scope.endpoint = e for e in $scope.endpoints when e.identifier is currentEndpoint
