Skip to content

Instantly share code, notes, and snippets.

@wallace7souza
Created September 1, 2015 03:24
Show Gist options
  • Save wallace7souza/a1897a7ba8280ebbfee2 to your computer and use it in GitHub Desktop.
Save wallace7souza/a1897a7ba8280ebbfee2 to your computer and use it in GitHub Desktop.
Angularjs formly angucomplete type
formlyConfig.setType({
name: 'angucomplete-remote',
//template: '<input show-weeks="false" class="form-control" min-date="to.minDate" ng-model="model[options.key]" is-open="to.isOpen" datepicker-options="to.datepickerOptions" />',
template: '<angucomplete-alt id="{{to.id}}" placeholder="{{to.placeholder}}" pause="{{to.pause}}" selected-object="model[options.key]" remote-url="'+endpoint+'{{to.url}}" '+
'description-field="{{to.label}}" search-fields="{{to.searchField}}" text-no-results="{{to.textNoResults}}" input-class="form-control form-control-small" title-field="{{to.titleField}}" match-class="{{to.matchClass}}" text-searching="{{to.textSearching}}"/>',
//templateUrl: 'datepicker.html',
wrapper: ['bootstrapLabel', 'bootstrapHasError'],
defaultOptions: {
ngModelAttrs: ngModelAttrs,
templateOptions: {
pause:400,
textSearching:'Pesquisando...',
textNoResults:'Sem resultados'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment