javascript - "device.uuid" cordova not working -
added cordova device plugin using command,
cordova plugin add cordova-plugin-device
but still "device.uuid
" not working.
please refer code below.
<script type="text/javascript" charset="utf-8" src="../cordova-7.0.1.js"></script> <script type="text/javascript" charset="utf-8"> // wait cordova load // document.addeventlistener("deviceready", ondeviceready, false); // cordova ready // function ondeviceready() { document.getelementbyid('deviceproperties').value = device.uuid ; } </script> <body class="screen_background"> <div class="scrollable screen_background"> <div class="scrollable-content"> <div class="col-lg-12 col-sm-12 event_form_div"> <div class="col-lg-12 col-sm-12 left_right event_form">artchitecs trust</div> <div class="col-lg-12 col-sm-12 left_right sevent_form_subtitle">enter details see latest event</div> <div class="col-lg-12 col-sm-12 font_align input_box_div" ng-app="mobileangularuiexamples" ng-controller="bookcontroller"> <form method="post" name="latest_event" id="latest_event" ng-submit="insertdata()"> <input class="input_box" type="text" name="name" placeholder="name" ng-model="bname" required/> <input class="input_box" type="text" name="email" placeholder="email" ng-model="bemail" required/> <input class="input_box" type="text" name="contact" placeholder="contact" ng-model="bcontact" required/> <input class="input_box" type="text" name="address" placeholder="address" ng-model="baddress"/> <input class="input_box" type="text" name="yearofpassing" placeholder="year of passing" ng-model="byear"/> <input class="input_box" type="hidden" name="duid" id="deviceproperties" ng-model="bduid"> <input type="submit" class="btn btn-default sub_btn" value="submit"> </form> <!-- <button type="submit" class="btn btn-default sub_btn" ng-click="insertdata()">submit</button>--> </div> <div class="col-lg-12 col-sm-12 left_right event_form_logo" ><img src="img/logo.jpg" alt="logoimg" class="logo"/></div> </div> </div> </div> </body>
Comments
Post a Comment