guptak13
5 years agoHelper
External Angular JS Plugin is not working in Lithium Angular
Hi,
I want to use an external AngularJs plugin within the angular app and below the code where we tried but no luck.
Following is a code sample.
Attached plugin: angularjs-dropdown-multiselect.min.js
<script type="text/javascript" src="/html/assets/lodash.min.js"></script>
<script type="text/javascript" src="/html/assets/angularjs-dropdown-multiselect.min.js"></script>
<div id="myFirstApp" ng-app="myFirstApp" ng-controller="myFirstCtrl" class="lia-page lia-content lia-top-quilt" li-bindable>
<div id="deliveryType" ng-dropdown-multiselect="" options="deliveryType" selected-model="selectedDeliveryType" checkboxes="true" extra-settings="deliveryTypeSettings" translation-texts="deleveryTypeText" class="dropdown-multiselect-button" events=""></div>
</div>
<@liaAddScript angular="true"> ;(function (angular) { var coreModuleDeps = LITHIUM.AngularSupport.getOptions().coreModuleDeps || []; coreModuleDeps.push('myFirstApp'); LITHIUM.AngularSupport.setOptions({ coreModuleDeps: coreModuleDeps }); angular.module('myFirstApp', ['angularjs-dropdown-multiselect']).controller('myFirstCtrl', ['$scope', function ($scope) { $scope.deliveryType = [{"id":"ILTc","label":"Live Instructor Led Training - Classroom"},{"id":"ILTv","label":"Live Instructor Led Training - Virtual"},{"id":"ODC","label":"On-Demand - Self-Paced Classroom"},{"id":"ODLe","label":"On-Demand Learning"},{"id":"ODLab","label":"On-Demand Lab"},{"id":"ODS","label":"On-Demand Subscription"}]; $scope.selectedDeliveryType = []; $scope.deliveryTypeSettings = { scrollableHeight: 'auto', scrollable: true, showCheckAll: false, showUncheckAll: false }; $scope.deleveryTypeText = { checkAll: 'Check All', uncheckAll: 'Uncheck All', selectionCount: 'checked', selectionOf: '/', searchPlaceholder: 'Search...', buttonDefaultText: '--Select Delivery Type--', dynamicButtonTextSuffix: 'checked' }; }]); })(LITHIUM.angular); </@liaAddScript>
Could you please guide us to resolve this issue?
Thanks!
Kamlesh