controller.js 1.51 KB
angular.module('focaTeclado')
    .controller('focaTecladoController', [
        '$scope',
        function($scope) {
            $scope.rows = {};
            $scope.rows.alfa = [
                ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'],
                ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'ñ'],
                ['z', 'x', 'c', 'v', 'b', 'n', 'm',
                    {type: 'erase', colspan: 3, text: 'spr'}
                ],
                [
                    {type: 'margin', colspan: 1},
                    {type: 'button', colspan: 6, text: ' '}
                ]
            ];

            $scope.rows.numeric = [
                [
                    {type: 'number', text: '7'},
                    {type: 'number', text: '8'},
                    {type: 'number', text: '9'}
                ],
                [
                    {type: 'number', text: '4'},
                    {type: 'number', text: '5'},
                    {type: 'number', text: '6'}
                ],
                [
                    {type: 'number', text: '1'},
                    {type: 'number', text: '2'},
                    {type: 'number', text: '3'}
                ],
                [
                    {type: 'number', text: '0', colspan: 2},
                    {type: 'number', text: '/'}
                ],
                [
                    {type: 'number', text: '.'},
                    {type: 'number', text: '*'},
                    {type: 'number', text: '+'}
                ]
            ];
    }]);