angularjs - Unknown provider NgTableParamsProvider <- NgTableParams -


i see lot of posts on stackoverflow error:

error: [$injector:unpr] unknown provider: ngtableparamsprovider <- ngtableparams http://errors.angularjs.org/1.5.8/$injector/unpr?p0=ngtableparamsprovider%20%3c-%20ngtableparams @ http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:33767:12 @ http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:38210:19 @ object.getservice [as get] (http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:38363:39) @ http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:38215:45 @ getservice (http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:38363:39) @ injectionargs (http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:38387:58) @ object.invoke (http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:38409:18) @ $controllerinit (http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:44053:34) @ nodelinkfn (http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:42962:34) @ compositelinkfn (http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:42319:13) <div ui-view="" class="ng-scope" data-ng-animate="1"> 

most of them seems related first uppercase of ngtableparams. well, took care of this. doesnt work :-(. orientated me @ example ngtable here: https://github.com/esvit/ng-table/tree/master/demo-apps/es6-webpack

this code:

import angular 'angular'; import angularmeteor 'angular-meteor'; import uirouter 'angular-ui-router'; import template './view1.html'; import angularcharts 'angular-chart.js'; import ngtable 'ng-table';  const name = 'view1';  class view1 { constructor($interval, $scope, $reactive, ngtableparams) {     'nginject';  //some code skipped      var data = [         { name: "moroni", age: 50 },         { name: "tiancum", age: 43 },         { name: "jacob", age: 27 },         { name: "nephi", age: 29 },         { name: "enos", age: 34 },         { name: "tiancum", age: 43 },         { name: "jacob", age: 27 },         { name: "nephi", age: 29 },         { name: "enos", age: 34 },         { name: "tiancum", age: 43 },         { name: "jacob", age: 27 },         { name: "nephi", age: 29 },         { name: "enos", age: 34 },         { name: "tiancum", age: 43 },         { name: "jacob", age: 27 },         { name: "nephi", age: 29 },         { name: "enos", age: 34 }     ];     this.tableparams = new ngtableparams({}, {         dataset: data     }); ....  } view1.$inject = ['ngtableparams'];  export default angular.module(name, [ angularmeteor, angularcharts, uirouter, ]).component(name, { ngtable, template, controlleras: name, controller: view1 })  .config(config);  function config($stateprovider) { 'nginject'; $stateprovider     .state('view1', {         url: '/allgemein',         template: '<view1></view1>'     }); } 

how can solve error? maybe has how want $inject ngtableparams.

edit: after updating code @sajeetharan said, error:

[$injector:modulerr] failed instantiate module main due to: error: [$injector:modulerr] failed instantiate module view1 due to: error: [$injector:modulerr] failed instantiate module {"ngtable":{"_invokequeue":[],"_configblocks":[],"_runblocks":[],"requires":["ngtable-core","ngtable-browser"],"name":"ngtable"},"default":{"_invokequeue":[["$provide","provider",{"0":"ngtabledefaultgetdata"}],["$provide","value",{"0":"ngtabledefaults","1":{"params":{},"settings":{}}}],["$provide","factory",{"0":"ngtableparams"}],["$provide","factory",{"0":"ngtableeventschannel"}]],"_configblocks":[],"_runblocks":[],"requires":[],"name":"ngtable-core"}} due to: error: [ng:areq] argument 'module' not function, got object 

is error related me? looks module inside has error :d.

edit2:

after adding quotes modules in your(@sajeetharan) example:

 [$injector:modulerr] failed instantiate module main due to:  error: [$injector:modulerr] failed instantiate module view1 due to:  error: [$injector:modulerr] failed instantiate module angularmeteor due to:  error: [$injector:nomod] module 'angularmeteor' not available! either misspelled module name or forgot load it. if registering module ensure specify dependencies second argument.  http://errors.angularjs.org/1.5.8/$injector/nomod?p0=angularmeteor 

he cant find angular-meteor anymore?! removed quotes modules except ngtables. got error:

typeerror: $reactive not function @ new view1 (http://localhost:3000/app/app.js?hash=cbd80421227e67667ccffb8b9f1fa2dd725c17fc:272:9) @ object.invoke (http://localhost:3000/packages/modules.js? 

i use helpers datas. $reactive: $reactive(this).attach($scope);.

for testing removed $reactive. telling me, ngtableparams not contructor -.-:

typeerror: ngtableparams not constructor @ new view1 (http://localhost:3000/app/app.js?hash=24ffbded787373a46d708b60a31466c47e1b756d:404:28) @ object.invoke (http://localhost:3000/packages/modules.js? 

i hope still want me errors :-(

you need inject ngtable module,

export default angular.module(name, [ 'angularmeteor', 'angularcharts', 'uirouter', 'ngtable' ]) 

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -