angularjs - Can the Angular $injector be decorated with $provide.decorator?

Perhaps this is a terrible idea, but if it is then please tell me why and then pretend that it's an academic exercise that won't see the light of day in production.I'd like to add some logic to the Angular $injector service, to monitor when certain services are injected into other services. Since it seems that Angular provides a mechanism for decorating services, I thought this would be the way to go. However, the following code throws an error.(function () { 'use strict'; var app = angular.module('app'); app.config(['$provide', functi...Read more

angularjs - error while using angular constant

I am trying to use angular constant in ny project which i need to get by making a http request to config.json file. But when i try to inject that constant in any controller, angular gives me the following error:Uncaught Error: [$injector:modulerr] Failed to instantiate module dashboard due to:Error: [$injector:unpr] Unknown provider: $httpMy code for angular constant and route looks lke this. 'use strict'; var dashboard = angular.module('dashboard', [ 'ngResource', 'ngSanitize', 'ngRoute', ]); dashboard.config...Read more

Simple AngularJS app with service does not work

I've got a very simple angular app that I can not figure out what is wrong with. The code is on plunkr here: and generates the error: Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:Error: [$injector:unpr] Unknown provider: testServiceThe code is below<!doctype html><html lang="en"><head> <meta charset="UTF-8"> <title>simple problem I can not figure out</title> <script src="// more

angularjs - Angular Grid ag-grid columnDefs Dynamically change

I have a problem about columnDefs change dynamically. Here is my gridOptions:$scope.gridOptions = { columnDefs: [], enableFilter: true, rowData: null, rowSelection: 'multiple', rowDeselection: true };and when I retrive data from server:$scope.customColumns = [];$'/Home/GetProducts', { tableName: 'TABLE_PRODUCT' }).success(function (data) { angular.forEach(data.Columns, function (c) { $scope.customColumns.push( { headerName: c.Name, field: c.Value,...Read more

angularjs - How to display column dynamically using ag-grid

I am new to angularjs technology.I'm using ag-grid and want to display column dynamicallymy json data is:[{Date:'12-12-2015',Name:'ammu',mark:20},{Date:'12-12-2015',Name:'appu',mark:24},{Date:'12-12-2015',Name:'anu',mark:27},{Date:'13-12-2016',Name:'ammu',mark:23},{Date:'13-12-2015',Name:'anu',mark:20}]My Expected Output isExpected OutputExisting Code is given below$scope.gridOptions = { columnDefs: [], enableFilter: true, rowData: [], rowSelection: 'multiple', rowDeselection: true}; $scope.customColumns = [];Getdetails();functio...Read more

angularjs - Angular-grid when using $http to load json data

I am using ag-grid plugin in a project. I get json data using $http service. But the grid shows blank in web page. But when json data is applied directly, grid works. I think this is probably due to delay in getting the data from $http. But as per angular concept, the grid should be updated when data comes. Is there any solution to show the html page only when data comes from the server.Below is my javascript file 'fileBrowser.js':var fileBrowserModule = angular.module('fileBrowser', ['agGrid']);fileBrowserModule.controller('fileBrowserControll...Read more

angularjs - Ag-grid Custom Filter: filterParams - cellRenderer in Angular 1.x

According to the documentation,, if I set the angularCompileFilters option to true in a grid's options object, the template in a cellRenderer will be taken as an Angular directive. However, I can only make the Angular compilation work for the cells - not the heading filters. Is it because it only works with the Ag-Grid-Enterprise version? Or is it simply a bug?Besides, I do not see any properly-documented sample snippets for that as well....Read more

angularjs - ag-grid not showing any data

I am using ag-grid with angularjs. so in controller I am populating rows of grid with the sql DB source. For this I am making webapi call which returns array of object. Following is the code.var module = angular.module("crud", ["agGrid"]);module.controller("crudCtrl", function ($scope, $http) {var columnDefs = [ { headerName: "Roll No", field: "RollNo", editable: true }, { headerName: "Name", field: "Name", editable: true }, { headerName: "Place", field: "PlaceName", editable: true }, { headerName: "Birth Date", field: "dob", editable: ...Read more

angularjs - Add / Remove row(s) in ag-grid

How to add or remove a row in ag-grid,i try this, but not work$scope.gridOptions.rowData.puch(data);and with thisscope.gridOptions.api.forEachNode( function(node) { var data =; updatedNodes.push(vehicle);});$scope.gridOptions.api.refreshRows(updatedNodes);Thank's...Read more

angularjs - Ng-grid export that calls cell filters

I'm working with an ng-grid and some columns have filters applied. However, when I export to CSV right now the values are displayed without filters:a record might like like this in json:{"service_date":"2014-02-10T00:00:00.000Z", "service_code":"someJob3", "price":1234.56}but in the grid it is displayed as:Service Date |Service Desc | Price-------------------------------------Feb 10,2014 |Some Job 3 | $1,234.56I'd like when I get an extract for it to appear as if the filter are applied but the only csv plugin does not seem to call cell filte...Read more

angularjs - How to apply custom Fliter formatter in a Slick grid custom cell formatter

How to apply custom angular filter formatter in slick-grid custom cell formatterSuppose I have an angular customer filter formatter that convert the date from one format to another format. var dateFilter = this.$filter('myDateFilterFormatter')('2006-04-07'); It returns as 4/7/06.How can I use myDateFilterFormatter in slick-grid custom cell formatterI have tried this waythis.dateFommatter = function(row, cell, value, columnDef, dataContext){ return "<p>"+ value | myDateFilterFormatter +"</p>"; };and also try this...Read more

angularjs - How to add a multiselect checkbox show/hide values at header columns at UI-GRID(rewritten NG-GRID)

Below is a sample UI-GRID, I toggled the Grid Menu.I want to achieve having multi-select checkbox values at header column and show/hide the row.. just like in Microsoft Office Excel when table is filtered.. below is a sample screenshotI can just select the values I want at the particular column and filter.. Just like the grid menu below, I can show/hide columns and they are enumerated.. but this time, I want row values at a particular column.Here's my code so far:app.controller('MainCtrl', ['$scope', function ($scope, $timeout) {var headerTempl...Read more

angularjs - For Angular js ui grid remove right and bottom scrolling boarders

In Angular js ui rid, how can I remove vertical and horizontal scrollbars ?And also for each column heading I am getting a little carrot icon by default, which shows sort ascend, sort descent, Hide column. I want to remove this also from my column headings. Instead .table-striped which comes by default for ui grid, I want to use .table-bordered. Is there any place to set these parameters to ui grid?...Read more