We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to bind and set an input with EJ Numeric

Thread ID:

Created:

Updated:

Platform:

Replies:

123536 Mar 27,2016 09:22 PM Mar 29,2016 05:05 AM JavaScript 3
loading
Tags: ejmNumeric
Rushikesh Joshi
Asked On March 27, 2016 09:22 PM

Hi Syncfusion Folks,

How can I configure input text for Numeric field in Syncfusion with RequireJS and AngularAMD?

I have a below code, 

<input type="text" class="form-control" id="txtNumber" ej-numerictextbox ng-model="Number" e-value="Number" e-decimalplaces="2" e-showspinbutton="false" e-incrementstep="0" maxlength="15" />

And from Controller I have below code.

        $scope.Number = 15000;

        $("#txtNumber").ejNumericTextbox();

When page is getting load it is not binding initial values neither from e-value nor from ng-model, also I need to specifically mentioned from code behind with ejNumericTextbox() to make that control numeric.

Can you please provide us a way to make this working like normal Angular works, Note, if I assigned like below it is working but I am looking if I can do something with e-value, e-decimalplaces etc... directives?

$("#txtNumber").ejNumericTextbox({
            name: "numeric",
            value: 5,
            width: "100%"
});

My questions is also for Calendar, Rating etc... controls.

Thanks
Rushi



Selvamani Sankarappan [Syncfusion]
Replied On March 28, 2016 09:22 AM

Hi Rushikesh,

Thanks for Contacting Syncfusion Support,

We have analyzed your query and we have prepared the sample based on your requirement (by using RequireJS with AngularJS). Please get the sample from the following location

http://jsplayground.syncfusion.com/1hlmsj45

Please refer the following code example:

[html]

<input id="numeric" type="text" ej-numerictextbox e-value="nvalue"/>



[script]

requirejs.config({

            paths: {

                "jquery": "http://cdn.syncfusion.com/js/assets/external/jquery-2.1.4.min",

                "jquery-easing": "http://cdn.syncfusion.com/js/assets/external/jquery.easing.1.3.min",

                "angular": "http://cdn.syncfusion.com/js/assets/external/angular.min",

                "scripts": 'http://cdn.syncfusion.com/js/assets/external',



                "ejscripts": 'http://cdn.syncfusion.com/13.4.0.63/js'


            },

            shim: {

                "jquery-easing": ["jquery"],


            }

        });

        require(["ejscripts/common/ej.widget.angular.min", "ejscripts/web/ej.editor.min"], function () {


            window.module = angular.module('EditCtrl', ['ejangular']);

            window.module.controller('EditorsCtrl', function ($scope) {

                $scope.nvalue = 600;



            });

            angular.bootstrap(document, ['EditCtrl']);


        });




Please let us know if you need any further assistance,

Regards,

Selvamani S


Rushikesh Joshi
Replied On March 28, 2016 09:27 AM

Thanks Selvamani,

I will verify this and will update on this thread, out of this, is there any documentation which I can refer for RequireJS implementation. This will really helps me for future implementation.

Thanks
Rushi

Selvamani Sankarappan [Syncfusion]
Replied On March 29, 2016 05:05 AM

Hi Rushikesh,

Thanks for the update,

We have provided the documentation for how to config the RequireJS with our ej components. Please get the more information about the RequireJS from the following link

http://help.syncfusion.com/js/requirejs

Refer to the following link to get the dependency script files for TextBox component. Similarly, documentation for other controls dependency script file is present within the corresponding component names.

http://help.syncfusion.com/js/api/ejtextboxes

To know more about the AngularJS, Please refer the following link:

http://help.syncfusion.com/js/angularjs

Please refer the following link to know about the AngularJS implementation with our ej components

http://js.syncfusion.com/demos/web/#!/azure/angularsupport/textboxes

Please let us know if you need any further assistance,

Regards,

Selvamani S


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;