function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {
      function boundTranscludeFn(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {

        if (!transcludedScope) {
          transcludedScope = scope.$new(false, containingScope);
          transcludedScope.$$transcluded = true;
        }

        return transcludeFn(transcludedScope, cloneFn, {
          parentBoundTranscludeFn: previousBoundTranscludeFn,
          transcludeControllers: controllers,
          futureParentElement: futureParentElement
        });
      }

      // We need  to attach the transclusion slots onto the `boundTranscludeFn`
      // so that they are available inside the `controllersBoundTransclude` function
      var boundSlots = boundTranscludeFn.$$slots = createMap();
      for (var slotName in transcludeFn.$$slots) {
        if (transcludeFn.$$slots[slotName]) {
          boundSlots[slotName] = createBoundTranscludeFn(scope, transcludeFn.$$slots[slotName], previousBoundTranscludeFn);
        } else {
          boundSlots[slotName] = null;
        }
      }

      return boundTranscludeFn;
    }
@ngdoc method
@name $location#search

@description
This method is getter / setter.

Return search part (as object) of current URL when called without any parameter.

Change search part when called with parameter and return `$location`.


```js
// given URL http://example.com/#/some/path?foo=bar&baz=xoxo
var searchObject = $location.search();
// => {foo: 'bar', baz: 'xoxo'}

// set foo to 'yipee'
$location.search('foo', 'yipee');
// $location.search() => {foo: 'yipee', baz: 'xoxo'}
```

@param {string|Object.<string>|Object.<Array.<string>>} search New search params - string or
hash object.

When called with a single argument the method acts as a setter, setting the `search` component
of `$location` to the specified value.

If the argument is a hash object containing an array of values, these values will be encoded
as duplicate search parameters in the URL.

@param {(string|Number|Array<string>|boolean)=} paramValue If `search` is a string or number, then `paramValue`
will override only a single search property.

If `paramValue` is an array, it will override the property of the `search` component of
`$location` specified via the first argument.

If `paramValue` is `null`, the property specified via the first argument will be deleted.

If `paramValue` is `true`, the property specified via the first argument will be added with no
value nor trailing equal sign.

@return {Object} If called with no arguments returns the parsed `search` object. If called with
one or more arguments returns `$location` object itself.