R
Ricardo Perdigao
Guest
Hi Martin, In my personal experience, copying code from the Blank canvas into the templates rarely works (different structure) ... I've created a sample for you, please try and let me know ... topSection.html Search: view-factory.js /* global angular */ (function(angular) { angular .module('viewFactories') .factory('customersCustomerMaintenance', ['$q', 'dsService', function($q, dsService) { function CustomersCustomerMaintenance() { this.scope = null; } CustomersCustomerMaintenance.prototype = { /* The resolve method could return arbitrary data, which will be available in the "viewShowHandler" and "viewHideHandler" handler as the customData argument */ onInit: function($stateParams) { return $q(function(resolve, reject) { resolve({}); }); }, /* "customData" is the data return by the viewInitHandler handler*/ onShow: function($scope, customData) { this.scope = $scope; }, /* "customData" is the data return by the viewInitHandler handler*/ onHide: function(customData) { }, /* Kendo event object*/ onRowSelect: function(e) { } }; return new CustomersCustomerMaintenance(); }]); angular .module('viewFactories') .controller('searchControler',function($scope,$http){ $scope.changeFilter = function () { var value = $scope.newInput; if (value) { var filter = { logic: 'or', filters: [ { field: 'Name', operator: 'contains', value: value }, { field: 'Address', operator: 'contains', value: value } ] }; $scope.grid.dataSource.filter(filter); } else { $scope.grid.dataSource.filter({}); } }; }); })(angular); Warm Regards, Ricardo Perdigao
Continue reading...
Continue reading...