krescruz / krescruz/angular-materialize

Too much recursion

Open
#110 1 comment 0 reactions 0 assignees View on GitHub
need more info
Dominant language
HTML
Stars
387
Forks
126
PR merge metrics
No merged PRs in 30d

Description

Hello:
I'm trying to make a form with some selects but when I try to add more than one select I get this error

```
InternalError: too much recursion
```

I wish could provide more info but only notice this when I include the **material-select** directive on the second select
If I don't include the directive, the select is rendered but as hidden element(I don't know why this happens too)

Maybe I'm missing something but here is my code for the view hope it helps...

``` html

Generate Report




Select Station





Select type
By Day
By Month
By Year



```

Just remark that the problem comes up when I add the **material-select** directive for the second time
Thanks in advance
#### Update 1

Just to complement If I delete the **ng-model** on my view the error is gone, but obviously i need the **ng-model** directive in order get the value from the select.
#### Update 2

If I initialize the options for my second select on my controller and then set it up my view with **ng-options**, everything runs perfect.
I hope this helps if somebody has the same but I'm still thinking this is a wrong behavior
Thanks again, let me know if I can help with something.

**Controller**

``` js
$scope.typeOptions = [
{
value: 'day',
label: 'Day'
},
{
value: 'month',
label: 'Month'
},
{
value: 'year',
label: 'Year'
},
];
```

**View**

``` html




Select type



```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the two-select view shown in the issue with material-select and ng-model, then compare it with the versions that omit ng-model or use ng-options. Trace the directive behavior around the second select; done means multiple selects render visibly without triggering “InternalError: too much recursion” while retaining model values.

Written by the indexing model from the issue text.

Assessment

Tech stack
angularjs
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.