jQWidgets Forums

jQuery UI Widgets Forums Plugins AngularJS Angular-Integration-Dependency Issue

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 9 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Angular-Integration-Dependency Issue #81676

    Keshavan
    Participant

    Hi,

    I am Having issue with setting dependency – to jqwidgets. (jqwidgets ver 4.0)
    var demoApp = angular.module(“demoApp”, [jqwidgets]);

    I have enclosed my code below.

    <!DOCTYPE html>
    <html ng-app="demoApp">
    
    <head>
        <title id="Description">jqxInput directive for AngularJS</title>
        <link rel="stylesheet" type="text/css" href="jqx.base.css" />
    
        <script type="text/javascript" src="jquery-1.11.1.min.js"></script>
        <script type="text/javascript" src="jqxcore.js"></script>
        <script type="text/javascript" src="jqxdata.js"></script>
        <script type="text/javascript" src="jqxinput.js"></script>
        <script type="text/javascript" src="angular.js"></script>
        <script type="text/javascript" src="demos.js"></script>
        <script type="text/javascript">
         <strong>   var demoApp = angular.module("demoApp", [jqwidgets]);</strong>
            demoApp.controller("demoController", function ($scope) {
                $scope.country = "foo";
                $scope.countries = new Array("Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burma", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Central African Republic", "Chad", "Chile", "China", "Colombia", "Comoros", "Congo, Democratic Republic", "Congo, Republic of the", "Costa Rica", "Cote d'Ivoire", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Fiji", "Finland", "France", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Greece", "Greenland", "Grenada", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, North", "Korea, South", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Mongolia", "Morocco", "Monaco", "Mozambique", "Namibia", "Nauru", "Nepal", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Norway", "Oman", "Pakistan", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Qatar", "Romania", "Russia", "Rwanda", "Samoa", "San Marino", " Sao Tome", "Saudi Arabia", "Senegal", "Serbia and Montenegro", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "Spain", "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Togo", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Yemen", "Zambia", "Zimbabwe");
            });
        </script>
    </head>
    
    <body>
        <div ng-controller="demoController">
            <jqx-input ng-model="country" jqx-source="countries" jqx-width="200" jqx-height="25" jqx-place-holder="'Enter a Country'"></jqx-input>
            <br />
            <br /> Model Value: {{country}}
        </div>
    </body>
    
    </html>

    Thanks,
    Keshavan

    Angular-Integration-Dependency Issue #81680

    Peter Stoev
    Keymaster

    Hi Keshavan,

    In the posted code, you are missing jqxangular.js plugin file. To avoid such simple issues, please look at the online samples about AngularJS which you can find on our website. We have many examples which source code about AngularJS. I suggest you to also read the documentation.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.