classMLRemoteInputService
Source: ml-remote-input.
angular service for working with ml-remote-input
new MLRemoteInputService($injector)
Parameter
Name | Type | Optional | Description |
---|---|---|---|
$injector |
Object |
|
angular dependency resolution service |
Methods
getPath(searchCtrl) → string
gets the path for a specified controller from the $route
service (if available)
Parameter
Name | Type | Optional | Description |
---|---|---|---|
searchCtrl |
string |
|
search controller name |
- Returns
-
nullable string
search controller path
initCtrl($scope, model, mlSearch, searchCallback)
helper function for Search controller
- registers and de-registers a callback that
- updates the qtext property of the model parameter
- invokes the searchCallback
- sets the mlSearch instance property
- initializes the qtext property of the model parameter (unless it's already set and the instance input property is not)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
$scope |
object |
|
search controller scope |
model |
object |
|
search controller model |
mlSearch |
|
controller mlSearch instance |
|
searchCallback |
function() |
|
search callback function |
- Deprecated
initInput($scope, mlSearch)
helper function for mlRemoteInput directive registers and de-registers a callback that
- updates the $scope parameter
- updates the mlSearch parameter with the mlSearch instance property (if it exists)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
$scope |
object |
|
search controller scope |
mlSearch |
|
controller mlSearch instance |
setInput(input)
sets the service.input instance property and invokes the registered callbacks
Parameter
Name | Type | Optional | Description |
---|---|---|---|
input |
string |
|
subscribe(callback) → function()
registers a callback, returning a de-registration function
Parameter
Name | Type | Optional | Description |
---|---|---|---|
callback |
function() |
|
a callback to be invoked when |
- Returns
-
function()
callback de-registration function