` provides two CSS classes that you may use to control the type of clipping.
*
* Note: The `md-truncate` also applies a setting of `width: 0;` when used with the `flex`
* attribute to fix an issue with the flex element not shrinking properly.
*
*
*
*
*
* Assigns the "ellipsis" behavior (default) which will cut off mid-word and append an ellipsis
* (…) to the end of the text.
*
*
*
* Assigns the "clipping" behavior which will simply chop off the text. This may happen
* mid-word or even mid-character.
*
*
*
*
*/
function MdTruncateDirective() {
return {
restrict: 'AE',
controller: MdTruncateController,
controllerAs: '$ctrl',
bindToController: true
}
}
/**
* Controller for the component.
*
* @param $element The md-truncate element.
*
* @constructor
* ngInject
*/
function MdTruncateController($element) {
$element.addClass('md-truncate');
}
})(window, window.angular);