Error: [Ara Error] [$compile:ctreq] Controller 'mdSelectMenu', required by directive 'mdOption', can't be found!
Error: [Ara Error] [$compile:ctreq] Controller 'mdSelectMenu', required by directive 'mdOption', can't be found!
this happens when i open md-dialog which has md-select which is populated by getting data through a http request and when i close and try to open md-dialog again it throws this error
+1
Please provide a CodePen or Plunkr that demonstrates this issue. Here are some starter demo templates that you can use/fork:
- CodePen template: http://codepen.io/pen?template=bEGJdd
- Plunkr template: http://plnkr.co/edit/yP0gB9iTacIQb48thud8?p=preview.
http://plnkr.co/edit/WGTCZXBzD9xx4WcpK5sj?p=preview
i created this plunker to demo my problem but it works fine over here. I dont knw wats going with it.
I am having the same issue too.
The same problem, but occurs only sometimes.
The code:
md-input-container.language-select
md-select(md-no-ink, ng-model="language")
md-option(ng-value="key" ng-repeat="(key, lang) in languages") {{ lang.name }}
I found that I had this issue due a digest call on the scope that should not have append. In my case a state.go from UI router.
@hthetiot and how did you fix that?
@hthetiot I would like to know as well.
Same issue here.
Only happens in the second time that I open the dialog.
I can't reproduce the issue with @mohsinmuzawar's demo. Is there a demo, which shows the issue? Or am I missing something?
@DevVersion I Cant reproduce it on plunker or codepen and it only occurs when u open the dialog second time
@mohsinmuzawar I can't investigate if I don't have stuff to work on. So a screenshot / GIF or anything else would be good.
I've found my fix! (hopefully this can help more of you out there).
Note: Using Angular-UI-Router
The way I fixed my issue was by including the templateUrl property in my view object. In the screenshot I've provided below, I was getting the issue in my 'role_assign' view but I wasn't getting an issue for my 'chat_board_view'. In my parent template I was declaring the role_assign view and including the html in the parent template and only defining the controller property in the view object. Once I moved the html from the parent view template into its own html file and included that in the view object's templateUrl the issue was resolved!

I tried the example suggested by @soohoowoohoo but it didn't work for me.
I discovered an other solution described below.
First I placed the HTML of the fields that was throwing the exceptions of Angular inside a NG-REPEAT code, and in JavaScript code of Angular I did a push inside the list when the interface was ready to be built.
Below my HTML before the changes: `
HTML after changes: `
In JavaScript, before to fill the information in my models to present the options of my md-select I set my NG-REPEAT model with an empty Array, like this: $scope.controls = [];
After all data got ready to be presented, I just append a new item in my array with this command. $scope.controls = [{}];
I used this code in 3 places of my application and it worked fine. These fields was in forms placed inside $mdDialog.
#6048 https://github.com/angular/material/issues/6048#issuecomment-174176247 the error is reproduced here by @Undrium
@Undrium has already created this plunk which demonstrates this issue . @DevVersion @ThomasBurleson Have a look
http://plnkr.co/edit/8fgPvsNA5YDgKC9DDYKs
#6048
@claudiozanin thanks, your solution works for me despite it strange look.
Occurs from the second time I open the dialog.
I solved my problem by adding to $mdDialog this option:
autoWrap:false,
@ram-you, I tried your solution but without any avail. Did you change anything else?