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

Error: [$compile:ctreq] Controller 'select', required by directive 'ngOptions', can't be found! #2

Open
azdineh opened this issue Dec 3, 2015 · 6 comments

Comments

@azdineh
Copy link

azdineh commented Dec 3, 2015

Error: [$compile:ctreq] Controller 'select', required by directive 'ngOptions', can't be foun
How can I resolve this problem ?

@WiHHi-Z3-PuX
Copy link

I have the same problem. I think it comes from this line:

in addstock-modal.html

@Jakhotiya
Copy link

As of angular 1.4 you can not use ng-options on any other element except select.
You can check this issue on angular-strap documentation. You can choose to use their alternative to ng-options,ie. bs-options. For now that will work. But later on when you start pulling data from yahoo finance you will have another issue. So I suggest you use select tag instead of input tag. Of course you won't be able to use nice autocomplete thing but you will be able to complete the chapter

@rhjennings
Copy link

rhjennings commented Oct 18, 2016

Has anyone gotten past this error?
Being new to angular, I tried to replace the input with a select tag. I'm not seeing any errors however the Stock never gets populated.
This is the tag I replaced the input with:

<select class="form-control" id="stock-symbol" ng-model="newStock.company" ng-options="company as company.label for company in companies" bs-select></select>

@jtsnr
Copy link

jtsnr commented Nov 25, 2016

@rhjennings the stock never gets populated due to another issue - #4

@rohtashsethi
Copy link

We have to use bs-options instead of ng-options. AngularStrap provide a directive bs-options for TypeAhead.
http://mgcrea.github.io/angular-strap/#typeaheads

@robeverett
Copy link

Well, well, this answers my question of why ul and li elements are used in the bootstrap dropdown, (and not select and option elements)

It's a shame there isn't a walkthrough on using bootstrap components with angularJS 1.4.9 anywhere :(

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

7 participants