Closed poojacmore closed 9 years ago
Mobile-angular-ui does not provide such component/directive at the moment. AngularJS is extensible by design, so you could drop in a specialized directive created for those purposes. Have look at https://github.com/JustGoscha/allmighty-autocomplete
Thank you so much for this hint. I will surely implement in this way.
You solved my problem.
Regards, Pooja
Hi RemcovandenBerg, I want to use autocomplete functionality with the entity fetched from the database. This is something I am trying to implement. I am using REST API,
$scope.autcomplete = function(typedthings) {
var scrollItems1 = [];
var newItems =[];
$http.get('/structr/rest/study/default').success(function(data, status, headers, config) { scrollItems1 = data.result.map(function(study1) { return study1.Domain; }); console.log(scrollItems1); $scope.scoll = scrollItems1; newItems = scrollItems1(typedthings); newItems.then(function(data){ $scope.scoll = data; }); }). error(function(data, status, headers, config) { console.log(data, status, headers, config); }); };
I am calling this on on-type event Its throwing lots of errors. Can you please check where I am making mistake.. It will be a great help.
Regards, Pooja
It should be as simple as:
<autocomplete ng-model="yourchoice" data="autoCompleteChoices" on-type="autcomplete"></autocomplete>
$scope.autoCompleteChoices = [];
$scope.autcomplete = function(typedthings) {
$http.get('/structr/rest/study/default')
.success(function(data, status, headers, config){
$scope.autoCompleteChoices = data.result.map(function(study1) {
return study1.Domain;
});
})
.error(function(data, status, headers, config) {
console.log(data, status, headers, config);
});
};
But I have not tested it, nor am I an expert or did I ever use this component. If you have further questions about it's usage, I think it is best to ask them on at the autocomplete project itself on Github.
Hey thanks a lot.. I made it very complicated actually.. Your code worked, but just a small problem now.. I hope you can help me, and sorry as I am giving you trouble. It is shifting the screen down when the list is loaded on page, Can you help with this please?
Regards, Pooja
Check your z-index, in the css of this component. It is set to 1 which should exclude it from the main. Maybe you have forgotten to add autocomplete.css
Hi Remco, I have added autocomplete.css at correct path still getting that behavior.
Regards, Pooja
On Thu, Apr 9, 2015 at 10:51 PM, Remco notifications@github.com wrote:
Check your z-index, in the css of this component. It is set to 1 which should exclude it from the main. Maybe you forgot to add autocomplete.css
— Reply to this email directly or view it on GitHub https://github.com/mcasimir/mobile-angular-ui/issues/242#issuecomment-91353207 .
Did you try increasing it's value? You can do this in your own css file by overriding the css style like this:
body .autocomplete ul{
z-index: 3000;
}
Hi Remco, I changed the z-index in autocomplete.css where it was 1 before to 3000 and added 3000 in demo.css as well. Still getting the same result.
Do you have any idea what can be the cause?
Regards, Pooja
On Thu, Apr 9, 2015 at 11:01 PM, Remco notifications@github.com wrote:
Did you try increasing it's value? You can do this in your own css file by overriding the css style like this:
body .autocomplete ul{ z-index: 3000; }
— Reply to this email directly or view it on GitHub https://github.com/mcasimir/mobile-angular-ui/issues/242#issuecomment-91355253 .
Try reading up on the subject of css layers / z-index and positioning. http://www.loginradius.com/engineering/simple-popup-tutorial
Hey Remco, Thanks a lot :) for your hints.. :) It worked..
Thank you so much
Regards, Pooja
On Thu, Apr 9, 2015 at 11:17 PM, Remco notifications@github.com wrote:
Try reading up on the subject of css layers / z-index and positioning. http://www.echoecho.com/csslayers.htm
— Reply to this email directly or view it on GitHub https://github.com/mcasimir/mobile-angular-ui/issues/242#issuecomment-91358116 .
Is there is any possible way to implement autocomplete with mobile angular ui? Like jQuery