Description
Twigkit service for registering and un-registering modalsMethods
close(name)
Hides the modal in the view.Parameters
Param | Type | Details |
---|---|---|
name | string | The ID of the modal to remove. |
Example
onClose(name, callback, scope)
When the modal’s close event is fired the callback function will be called.Parameters
Param | Type | Details |
---|---|---|
name | string | The name of the modal, if null the callback will fire whenever a modal is closed |
callback | Function | The function to be called when the cancel event is fired. |
scope | Object | The $scope object for unsubscribing to the event when the scope is destroyed. |
Example
register(modal)
Registers the modal to the factoryParameters
Param | Type | Details |
---|---|---|
modal | string | The modal object. |
Example
show(name)
Shows the modal in the view.Parameters
Param | Type | Details |
---|---|---|
name | string | The ID of the modal to remove. |
Example
unregister(name)
Un-registers the modal removing it from the view and the factory.Parameters
Param | Type | Details |
---|---|---|
name | string | The ID of the modal to remove. |