0

I have to create a Mock functionality which will allow the user to dial through the screen.The problem is on select of particular Keypad the number is not appearing in the Text Box which is bind with it.

The console showing the number clicked

<input type="text" class="form-control" data-ng-model="phone_number"></input>
<bc-keypad bc-number-model="phone_number"></bc-keypad>
module.exports = {
  client: {
lib: {
  css: [
     'public/lib/angular-keypad/dist/angular-keypad.css'
  ],
  js: [
     'public/lib/angular-keypad/dist/angular-keypad.js'
  ]
 },
};

Below is my config.js where i have added my dependency

var applicationModuleVendorDependencies = ['..','..'bc.AngularKeypad'];

My Controller Code is below :

var app = angular.module('dialer');
app
.controller(
    'messageController',
    function($scope, $http, $rootScope, dashboardServices, incidentServices, $state, $stateParams, $modal) {
        $scope.init = function() {

I am using ng-keypad for this and i m pretty new in angular js and use the below link to create the dialer.

Creating Dialer using angulerjs

Pawan Kumar
  • 522
  • 4
  • 9
  • 29
  • 1
    without seeing more of the code, it's not obvious what the issue is here. however, you do seem to be breaking a cardinal rule of angularjs : **always use a dot in angular bindings**. i.e. bind to object properties, not primitives. – Claies Jul 27 '17 at 07:10
  • none of the code you added is helpful or complete. see [mcve]. – Claies Jul 27 '17 at 07:34
  • @Claies Added the link also, please have a look...I am kind of stuck.. – Pawan Kumar Jul 27 '17 at 07:36
  • the link doesn't have *your* code. the part of *your* code that you posted here uses a binding to a **primitive**, meaning that you are subject to [JavaScript Prototype Inheritance Issues](https://stackoverflow.com/questions/14049480/what-are-the-nuances-of-scope-prototypal-prototypical-inheritance-in-angularjs) that aren't present in the link you posted (note, in the link, the bindings all have a dot). you need to create a [mcve] of the issue. – Claies Jul 27 '17 at 07:39
  • The link is what i have refer to create the dialer – Pawan Kumar Jul 27 '17 at 07:50

0 Answers0