You are reading a single comment by @user100558 and its replies. Click here to read the full conversation.
  • Hi Guys, sorry for my mistake and didn't place the code.

    I'm using cordova with angular v 1.*.


    my head

    <!DOCTYPE html> <html>
            Customize this policy to fit your own app's needs. For more guidance, see:
            Some notes:
                * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
                * is required only on Android and is needed for TalkBack to function properly
                * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
                    * Enable inline JS: add 'unsafe-inline' to default-src
            <meta name="format-detection" content="telephone=no">
            <meta name="msapplication-tap-highlight" content="no">
            <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
            <link rel="stylesheet" type="text/css" href="js/bootstrap/css/bootstrap.min.css­">
            <link rel="stylesheet" href="css/angular-material.min.css">
            <link rel="stylesheet" type="text/css" href="css/index.css">
            <link rel="stylesheet" type="text/css" href="css/specialinputs.css">
            <script type="text/javascript" src="js/jquery-2.2.1.min.js"></script>
            <script type="text/javascript" src="js/bootstrap/js/bootstrap.min.js"><­/script>
            <script src="js/angular.js"></script>
            <script src="js/angular-route.js"></script>
            <script src="js/angular-animate.js"></script>
            <script src="js/angular-aria.min.js"></script>
            <script src="js/angular-messages.min.js"></scrip­t>
            <script src="js/angular-material.min.js"></scrip­t>
            <script src=""></­script>
            <script src="­i/js?key=AIzaSyDKO91w7TH8iP4MN1ziQT0BOqj­sWtJtpqk&libraries=places,drawing,geomet­ry" async defer></script>

    Then, my code in the angular file.

    scope.btnstatus = function(action) {
            if(action == 'on') {
                Puck.write('LED1.set();\n',function() {
            else {
                Puck.write('LED1.reset();\n',function() {
        $scope.magOn = function() {
            Puck.on('mag', function(xyz) {

Avatar for user100558 @user100558 started