Skip to main content

Description

Twigkit service for queries

Methods

clearQueries()

Will remove all the queries from the factory.

Example

convertHttpParamsToQuery(httpParams)

Converts http params to query value..

Parameters

Example

convertHttpParamsToUrl(httpParams)

Converts http params into a URL.

Parameters

Example

convertQueryToHttpParams(query, excludeHiddenFilters)

Converts an object based query to HTTP Params.

Parameters

Returns

Example

convertQueryToUrl(query, includeHiddenFilters)

Converts query object into a URL, encoding necessary values correctly and optionally removing hidden filters

Parameters

Example

convertSortObjectToParam()

Will convert sort object into a parameter.

Example

convertSortParamToObject()

Will convert sort parameter into an object.

Example

getQuery(name)

Gets the value of the query from the factory. If no query is found, the factory will return null.

Parameters

Returns

Example

getQueryAsHttpParams(name, excludeHiddenFilters)

Gets the value of the query from the factory. If no query is found, the factory will return null.

Parameters

Returns

Example

queryContainsFilterForField(query, fieldName, filter)

Will identify if the query contains the filter.

Parameters

Example

removeFiltersForField(query, fieldName)

Will remove any filters relating to the field name

Parameters

Example

setQuery(name, value)

Adds the query value to the factory.

Parameters

Example

Events

query_name_updated

When the query is set or changed Lightning will broadcast this message where name is the name of your query query_name_updated

Type:

broadcast

Target:

root scope