Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting text from input #93

Open
iraj-jelo opened this issue Mar 29, 2015 · 2 comments
Open

getting text from input #93

iraj-jelo opened this issue Mar 29, 2015 · 2 comments

Comments

@iraj-jelo
Copy link

can i get typed text in angucomplete input from my controller when any object is not exist and is not returned ? something like "ng-model"?

@flareofghast
Copy link

I would also like to do this, I even tried to get the ng-model="searchStr" but that wasn't available in $scope.

@flareofghast
Copy link

OK, so I found a way on how to do this (if you're still after it):
I edited angucomplete.js like thus

         scope: {
    15             "id": "@id",
    14             "placeholder": "@placeholder",
    13             "selectedObject": "=selectedobject",
    12             "url": "@url",
    11             "dataField": "@datafield",
    10             "titleField": "@titlefield",
     9             "descriptionField": "@descriptionfield",
     8             "imageField": "@imagefield",
     7             "imageUri": "@imageuri",
     6             "inputClass": "@inputclass",
     5             "userPause": "@pause",
     4             "localData": "=localdata",
     3             "searchFields": "@searchfields",
     2             "minLengthUser": "@minlength",
~    1             "matchClass": "@matchclass",
+ 27               "searchStr": "@searchStr"                   

so at line 26 I added a comma, then at 27 I added searchStr

now in my app I can access it using

$scope.$$childHead.searchStr

it's not elegant but it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants