There are multiple components used by modal.
show
Type: Function
Show a modal based on the modal id
resize
Type: Function
Update the position and also the size of the modal
hide
Type: Function
Hide currently opened modal
bindingEvents
Type: Function
Binding escape key or resize event
register
Type: Function
Registering modal with the service
unregister
Type: Function
Remove modal from modal service
clearWaiting
Type: Function
Remove certain modal id from waiting list
Element directive to define the modal dialog. Modal content is transcluded into a
modal template
mac-modal-keyboard
Type: Boolean
Allow closing modal with keyboard (default false)
mac-modal-overlay-close
Type: Boolean
Allow closing modal when clicking on overlay (default false)
mac-modal-resize
Type: Boolean
Allow modal to resize on window resize event (default true)
mac-modal-open
Type: Function
Callback when the modal is opened
mac-modal-topOffset
Type: Integer
Top offset when the modal is larger than window height (default 20)
Modal attribute directive to trigger modal dialog
mac-modal
Type: String
Modal ID to trigger
mac-modal-data
Type: Object
Extra data to pass along
<mac-modal id="test-modal" mac-modal-keyboard> <div ng-controller="modalController" class="modal-content"> <h1>Just another modal</h1> </div> </mac-modal> <button mac-modal="test-modal" mac-modal-content="maGyverSeasonOne" class="btn">Show Modal</button>
There are multiple components used by scrollspy
Scrollspy defaults:
offset - 0
register
Type: Function
Register an anchor with the service
unregister
Type: Function
Remove anchor from service
setActive
Type: Function
Set active anchor and fire all listeners
addListener
Type: Function
Add listener when active is set
removeListener
Type: Function
Remove listener
Element to spy scroll event on
mac-scroll-spy-offset
Type: Integer
Top offset when calculating scroll position
Section in the spied element
refresh-scroll-spy
Type: Event
To refresh the top offset of all scroll spy anchors
Element to highlight when anchor scroll into view
mac-scroll-spy-target
Type: String
Name of the anchor
mac-scroll-spy-target-class
Type: String
Class to apply for highlighting (default active)
<body mac-scroll-spy mac-scroll-spy-offset="10"></body>
<ul class="nav nav-list docs-sidenav"> <li mac-scroll-spy-target="modal"><a href="#modal">Modal</a></li> <li mac-scroll-spy-target="scrollspy"><a href="#scrollspy">Scroll Spy</a></li> </ul>
<section id="modal" mac-scroll-spy-anchor></section>
Fix the component at a certain position
mac-affix-disabled
Type: Expr
To unpin element
mac-affix-top
Type: Expr
Top offset (default 0)
mac-affix-bottom
Type: Expr
Bottom offset (default 0)
<div mac-affix>Nav content</div>
Tooltip directive
mac-tooltip
Type: String
Text to show in tooltip
mac-tooltip-direction
Type: String
Direction of tooltip (default 'top')
mac-tooltip-trigger
Type: String
How tooltip is triggered (default 'hover')
mac-tooltip-inside
Type: Boolean
Should the tooltip be appended inside element (default false)
mac-tooltip-disabled
Type: Expr
Disable and enable tooltip
<a href="#" mac-tooltip="Tooltip on bottom" mac-tooltip-direction="bottom">Tooltip on bottom</a>
A directive for providing suggestions while typing into the field
ng-model
Type: String
Assignable angular expression to data-bind to
mac-placeholder
Type: String
Placeholder text
mac-autocomplete-url
Type: String
Url to fetch autocomplete dropdown list data. URL may include GET params e.g. "/users?nocache=1"
mac-autocomplete-source
Type: Expression
Data to use.
Source support multiple types:
mac-autocomplete-disabled
Type: Boolean
Boolean value if autocomplete should be disabled
mac-autocomplete-on-select
Type: Function
Function called when user select on an item
- `selected` - {Object} The item selected
mac-autocomplete-on-success
Type: Function
function called on success ajax request
- `data` - {Object} Data returned from the request
- `status` - {Number} The status code of the response
- `header` - {Object} Header of the response
mac-autocomplete-on-error
Type: Function
Function called on ajax request error
- `data` - {Object} Data returned from the request
- `status` - {Number} The status code of the response
- `header` - {Object} Header of the response
mac-autocomplete-label
Type: String
The label to display to the users (default "name")
mac-autocomplete-query
Type: String
The query parameter on GET command (default "q")
mac-autocomplete-delay
Type: Integer
Delay on fetching autocomplete data after keyup (default 800)
<mac-autocomplete mac-autocomplete-url="autocompleteUrl" mac-autocomplete-query="q" mac-autocomplete-on-success="onSuccess(data)" mac-autocomplete-placeholder="'Autocomplete'"> </mac-autocomplete>
<mac-autocomplete mac-autocomplete-source="['hello', 'world']" mac-placeholder="'Autocomplete'"> </mac-autocomplete>
A directive for generating tag input with autocomplete support on text input
mac-tag-autocomplete-url
Type: String
Url to fetch autocomplete dropdown list data.
mac-tag-autocomplete-url and mac-tag-autocomplete-source cannot be used together. Url
will always take priority over mac-tag-autocomplete-source.
mac-tag-autocomplete-source
Type: String
Data to use.
Source support multiple types:
mac-tag-autocomplete-value
Type: String
The value to be sent back upon selection (default "id")
mac-tag-autocomplete-label
Type: String
The label to display to the users (default "name")
mac-tag-autocomplete-model
Type: Expr
Model for autocomplete
mac-tag-autocomplete-selected
Type: Array
The list of elements selected by the user
mac-tag-autocomplete-query
Type: String
The query parameter on GET command (defualt "q")
mac-tag-autocomplete-delay
Type: Integer
Time delayed on fetching autocomplete data after keyup (default 800)
mac-tag-autocomplete-placeholder
Type: String
Placeholder text of the text input (default "")
mac-tag-autocomplete-disabled
Type: Boolean
If autocomplete is enabled or disabled (default false)
mac-tag-autocomplete-on-enter
Type: Expr
When autocomplete is disabled, this function is called on enter, Should return either string, object or boolean. If false, item is not added
item
- {String} User input mac-tag-autocomplete-events
Type: String
A CSV list of events to attach functions to
mac-tag-autocomplete-on-
Type: Expr
Function to be called when specified event is fired
event
- {Object} jQuery event value
- {String} Value in the input text mac-tag-autocomplete-clear-input
Type: Event
$broadcast message; clears text input when received
<mac-autocomplete mac-autocomplete-url="autocompleteUrl" mac-autocomplete-query="q" mac-tag-autocomplete-selected="tagAutocompleteSelected" mac-tag-autocomplete-value="id" mac-tag-autocomplete-label="name" mac-autocomplete-placeholder="'Autocomplete'" mac-autocomplete-model="tagAutocompleteModel"> </mac-autocomplete>
<mac-tag-autocomplete mac-tag-autocomplete-selected="tagAutocompleteDisabledSelected" mac-tag-autocomplete-placeholder="tagAutocompletePlaceholder" mac-tag-autocomplete-value="" mac-tag-autocomplete-label="" mac-tag-autocomplete-disabled="true"> </mac-tag-autocomplete>
<mac-tag-autocomplete mac-tag-autocomplete-selected="tagAutocompleteEvents" mac-tag-autocomplete-placeholder="tagAutocompletePlaceholder" mac-tag-autocomplete-value="key" mac-tag-autocomplete-label="key" mac-tag-autocomplete-on-enter="tagAutocompleteOnSelected(item)" mac-tag-autocomplete-events="blur,keyup" mac-tag-autocomplete-on-blur="tagAutocompleteOnBlur($event, item)" mac-tag-autocomplete-on-keyup="tagAutocompleteOnKeyup()" mac-tag-autocomplete-disabled="true" mac-tag-autocomplete-model="tagAutocompleteModel"> </mac-tag-autocomplete>
A directive for creating a datepicker on text input using jquery ui
mac-datepicker-id
Type: String
The id of the text input field
mac-datepicker-model
Type: String
The model to store the selected date
Clearing model by setting it to null or '' will clear the input field
mac-datepicker-on-select
Type: Function
Function called before setting the value to the model
date
- {String} Selected date from the datepicker instance
- {Object} Datepicker instance mac-datepicker-on-close
Type: String
Function called before closing datepicker
date
- {String} Selected date from the datepicker instance
- {Object} Datepicker instance mac-datepicker-append-text
Type: String
The text to display after each date field
mac-datepicker-auto-size
Type: Boolean
Automatically resize the input to accommodate dates in the current dateFormat
mac-datepicker-change-month
Type: Boolean
Whether the month should be rendered as a dropdown instead of text
mac-datepicker-change-year
Type: Boolean
Whether the year should be rendered as a dropdown instead of text
mac-datepicker-constrain-input-type
Type: Boolean
Constrain characters allowed by the current dateFormat
mac-datepicker-current-text
Type: String
Text to display for the current day link
mac-datepicker-date-format
Type: String
The format for parse and displayed dates
mac-datepicker-default-date
Type: Expression
Date to highligh on first opening if the field is blank {Date|Number|String}
mac-datepicker-duration
Type: String
Control the speed at which the datepicker appears
mac-datepicker-first-day
Type: Integer
Set the first day of the week. Sunday is 0, Monday is 1
mac-datepicker-max-date
Type: Expression
The maximum selectable date {Date|Number|String}
mac-datepicker-min-date
Type: Expression
The minimum selectable date {Date|Number|String}
mac-datepicker-number-of-months
Type: Integer
The number of months to show at once
mac-datepicker-show-on
Type: String
When the datepicker should appear
mac-datepicker-year-range
Type: Integer
The range of years displayed in the year drop-down
mac-datepicker-disabled
Type: Boolean
Enable or disable datepicker
<mac-datepicker mac-datepicker-id="input-start-date" mac-datepicker-model="startDate"></mac-datepicker>
A directive for creating a time input field
mac-time-model
Type: String
Assignable angular expression to data-bind to
Clearing model by setting it to null or '' will set model back to default value
mac-time-placeholder
Type: String
Placeholder text of the text input (default --:--)
mac-time-disabled
Type: String
Enable or disable time input
mac-time-default
Type: String
If model is undefined, use this as the starting value (default 12:00 PM)
<mac-time mac-time-id="input-start-time" mac-time-model="myStartTime" mac-time-default="11:59 PM"> </mac-time>
A directive for generating tag input.
mac-tag-input-tags
Type: String
The list of elements to populate the select input
mac-tag-input-selected
Type: String
The list of elements selected by the user
mac-tag-input-placeholder
Type: String
Placeholder text for tag input (default "")
mac-tag-input-value
Type: String
The value to be sent back upon selection (default "id")
mac-tag-input-label
Type: String
The label to display to the users (default "name")
Proxy directive to mac tag autocomplete
<mac-tag-input mac-tag-input-tags="extraTagInputs" mac-tag-input-placeholder="Select all target countries" mac-tag-input-selected="selected" mac-tag-input-value="id" mac-tag-input-label="name"> </mac-tag-input>
A directive for generating spinner
mac-spinner-size
Type: Integer
The size of the spinner (default 16)
mac-spinner-z-index
Type: Integer
The z-index (default inherit)
mac-spinner-color
Type: String
Color of all the bars (default #2f3035)
<mac-spinner></mac-spinner>
A directive for generating a canvas spinner
This spinner requires much less CPU/GPU resources than CSS spinner
mac-cspinner-width
Type: Integer
Width of each bar (default 2)
mac-cspinner-height
Type: Integer
Height of each bar (default 5)
mac-cpsinner-border
Type: Integer
Border radius (default 1)
mac-cspinner-size
Type: Integer
Dimension of the whole spinner excluding padding (default 20)
mac-cspinner-radius
Type: Integer
Center radius (default 4)
mac-cspinner-bars
Type: Integer
Number of bars (default 10)
mac-cspinner-padding
Type: Integer
Padding around the spinner (default 3)
mac-cspinner-speed
Type: Integer
ms delay between each animation
mac-cspinner-color
Type: String
Color of each bar
mac-cspinner-spin
Type: Expr
Start or stop spinner
<mac-cspinner></mac-cspinner>
Directive for proxying jQuery file upload
mac-upload-route
Type: String
File upload route
mac-upload-submit
Type: Function
Function to call on submit
mac-upload-success
Type: Function
Upload success callback
mac-upload-error
Type: Function
Upload error callback
mac-upload-always
Type: Function
Callback for completed (success, abort or error) requests
mac-upload-previews
Type: Expression
List of uploaded files {Array}
mac-upload-progress
Type: Function
Upload progress callback
mac-upload-drop-zone
Type: String
The selector that we can drop files onto
mac-upload-form-data
Type: Expression
Additional form data {Array|Object|Function|FormData}
mac-upload-options
Type: Expression
Additional options to pass to jquery fileupload
<input type="file" name="files[]" ng-disabled="!fileUploaderEnabled" multiple="multiple" mac-upload="mac-upload" mac-upload-route="uploadRoute" mac-upload-success="fileUploadSuccess($data, $status)" mac-upload-error="fileUploadError($response, $data, $status)" mac-upload-submit="fileUploadSubmit($event, $data)" mac-upload-drop-zone=".example-hit-area" mac-upload-previews="uploadPreviews"/> <ul> <li ng-repeat="preview in uploadPreviews"> <img ng-src="{{previewImage(preview)}}"/> <span>{{preview.fileName}}</span> </li> </ul>
Dynamically fill out the placeholder text of input
mac-placeholder
Type: String
Variable that contains the placeholder text
<input type="text" mac-placeholder="placeholderVariable">