public void Link(Scope scope, jElement el, Attributes attrs, NgModelController ngModel) { dynamic element = el; if(ngModel==null) return; // do nothing if no ng-model // Write data to the model Action read = ()=> { var html = element.html(); // When we clear the content editable the browser leaves a <br> behind // If strip-br attribute is provided then we strip this out string stripBr = attrs["stripBr"]; if( stripBr!="" && html == "<br>" ) html = ""; ngModel.setViewValue(html); }; // Specify how UI should be updated ngModel.render = ()=> { element.html(_sce.getTrustedHtml(ngModel.viewValue)); }; // Listen for change events to enable binding element.on("blur keyup change", (Action) delegate() { scope.Apply(read); }); read(); // initialize }
public void Link(Scope _scope, jElement iElement, Attributes iAttrs, AccordionController acontroller) { ExpanderController ctrl = _scope.ControllerAs<ExpanderController>("ccc"); ctrl.accordionController = acontroller; ctrl.accordionController.addExpander(ctrl); }
public void Link(ExpanderController _scope, AngularJS.Element iElement, Attributes iAttrs, AccordionSharedController acontroller) { accordionController = acontroller; showMe = false; accordionController.addExpander(this); }
public void Link(Scope _scope, jElement elem, Attributes attrs) { elem.bind("blur",(ev)=> { _scope.Apply<string>(attrs["todoBlur"]); }); }
public void Link(Scope _scope, jElement elem, Attributes attrs) { _scope.Watch<bool>(attrs["todoFocus"], (newValue, oldValue) => { if(newValue) { timeout.Set( ()=>{ elem[0].Focus(); }, 0, false); } }); }
public void Link(Scope _scope, AngularJS.Element iElement, Attributes iAttrs, AccordionSharedController acontroller) { //Debug.Break(); ppp = "fissa"; }