angularjs - Two ng-inits not working -


i have 2 ng-inits located here.

        <div class="text-center">             <h3 style="font-size: 26px">                 <editable ng-init="option={title:'event title here'};" model="option.title">{{option.title}}</editable>             <!-- <editable model="option.title">{{option.title}}</editable> -->         </h3>             <h5>                 <editable ng-init="option={description:'event description here'};" model="option.description">{{option.description}}</editable>             </h5>         </div> 

what happens first ng-init ignored , second 1 used. need both used

i have no idea why, wanting have both {{}} areas have placeholder, , way have found out how far.

you overwriting object created in first ng-init 1 created in second ng-init. should either have upper ng-init initalize option object @ {} , let current 2 ng-inits set particular field, or initialize whole object in 1 place.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -