Environment versions
Network:
Windows 2003 Server
>>>So, that option generates bad request. Why if I change value="0" it doesn't show at all? Do you see the reason?
>>
>>It doesn't show because it doesn't get added. As to why it doesn't get added - I don't know. There's an interaction there with angular generated HTML so anything could be happening - even if you found a working solution for now there's no guarantee that a future version of angular might cause it to break.....
>>
>>Best stick with one of the solutions I suggested...
>
>I'll try server side solution. As I said, I tried JavaScript solution in the controller and again it was not added!!!
Works for me. Are you saying unshift() didn't add it to the array or that it did but it didn't show up in the dropdown?
>BTW, there will be an additional twist. In that form the item tree id will be required (not 0) for some cases and non required (can be 0) for other cases.
>
>Do you know what will be the best way to handle this scenario? Should I do something like
>\ng-required = "someFunction()" for this and in that function check for 0 in the value?
Not entirely sure what you mean but if you don't want the option to be available then isn't it simpler (and more intuitive for the user) just to remove it on the client side - or just don't add it in the first place. Failing that the I'd think a directive might be better than ng-required ?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only