Closed Nishchit14 closed 8 years ago
Hi @Nishchit14, I really like this feature but I cannot merge your PR it as-is, since your code is completely different from mine, you should respect my coding style (I mean, using TABS instead of spaces etc..), so that I can track changes and easily review your code.
Anyway, I like your plan of having an all-in-one "remote" property, as you said on gitter, used like this:
remote
is an Object: data are fetched by native $http serviceremote
is a Function: data are fetched using a custom service or any other way user wantAlso, I think that is better if remote/refresh function has only a search
parameter and return a deferred object. What are your thought?
Thank you @indrimuska, I am very sorry for codding style, But it is auto formatting at commit time by IDE.
And just for advise, We should use jsHint or ESLint to maintain our codding standard, because every IDE has their own default style standard.
And i am agree with plan-2, All in one feature as remote attr and has only search
parameter and return deferred object.
If you have green flag then i will do it in short time.
Yes, of course! Open another PR whenever you want! :)
Refresh attribute added for fetch selector options by controller service directly,
Directive
In controller
Here refresh function get first param as search text , which will used in service to get data and second param as callback options which will get service response as options for selector.