ng-init does not work

0

I have this:

<input type='text' name="dateQualitative" ng-model="dateQualitative" 
       ng-init="dateQualitative='${valor}'" />  ===> Esto funciona

But this other one does not:

<div ng-show="scenario.individualQualitative" id='dateQualitative'>
    <input type='text' name="dateQualitative" ng-model="dateQualitative" 
           ng-init="dateQualitative='${valor}'" />
</div>

Any suggestions?

EDIT

The code works perfectly, it's the DataPicker integration script

<script type="text/javascript">
    $(function () {
        $('#dateQualitative').datetimepicker({

        });
    });
</script>
    
asked by sirdaiz 29.09.2016 в 20:03
source

1 answer

0

@devconcept you have all the reason, it's because of the script that I have:

div ng-show="true" class='input-group date' id='dateQualitative'> 
input type='text' name="dateQualitative" 
        ng-model="dateQualitative" 
        ng-init="dateQualitative='${date}'"
            class="form-control" />
        span class="input-group-addon">
            span class="glyphicon glyphicon-calendar"></span>
        span>
/div>

script type="text/javascript">
    $(function () {
        $('#dateQualitative').datetimepicker({
                });
    });
/script>

If I comment on the script, you can see the value, I'm using the datetimepicker API.

Any suggestions?

    
answered by 01.10.2016 в 10:42