Skip to content

Instantly share code, notes, and snippets.

@yellow1912
Created August 27, 2016 02:57
Show Gist options
  • Save yellow1912/c261510351d2280f61353ecce7151faf to your computer and use it in GitHub Desktop.
Save yellow1912/c261510351d2280f61353ecce7151faf to your computer and use it in GitHub Desktop.
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