Created
August 27, 2016 02:57
-
-
Save yellow1912/c261510351d2280f61353ecce7151faf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nilead.namespace('nilead.design.form.font-selection', class FontSelectionDirective { | |
constructor() { | |
this.restrict = 'E'; | |
this.require = 'ngModel'; | |
this.scope = true; | |
this.bindToController = {model: '=ngModel'}; | |
this.replace = true; | |
this.transclude = true; | |
// this.templateUrl = 'form.length-adjuster.html'; | |
this.controllerAs = 'FontSelectionController'; | |
this.controller = ['$scope', '$element', '$attrs', '$transclude', nilead.get('nilead.design.form.font-selection-controller')]; | |
} | |
}); | |
nilead.namespace('nilead.design.form.font-selection-controller', | |
/** | |
* @property {Object} model | |
* @property {Number} sensitive | |
* @property {String} type | |
*/ | |
class FontSelectionController { | |
/** | |
* @param {ChildScope} scope | |
* @param {jQuery} element | |
* @param {Attributes} attrs | |
* @param {Function} transclude | |
*/ | |
constructor(scope, element, attrs, transclude) { | |
this.scope = scope; | |
this.element = element; | |
this.attrs = attrs; | |
this.element.find('.nl-transclude').replaceWith(transclude()); | |
} | |
$onInit() { | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment