0

私はこのエラーとstackoverflowの上の記事の多くを参照してください。不明なプロバイダNgTableParamsProvider < - NgTableParams

Error: [$injector:unpr] Unknown provider: NgTableParamsProvider <- NgTableParams 
http://errors.angularjs.org/1.5.8/$injector/unpr?p0=NgTableParamsProvider%20%3C-%20NgTableParams 
at http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:33767:12 
at http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:38210:19 
at Object.getService [as get] (http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:38363:39) 
at http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:38215:45 
at getService (http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:38363:39) 
at injectionArgs (http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:38387:58) 
at Object.invoke (http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:38409:18) 
at $controllerInit (http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:44053:34) 
at nodeLinkFn (http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:42962:34) 
at compositeLinkFn (http://localhost:3000/packages/modules.js?hash=5b256037162d84065d102fdba9b374faa45dbd89:42319:13) <div ui-view="" class="ng-scope" data-ng-animate="1"> 

それらのほとんどは、N gTableParamsの最初の大文字と関連しているように見えます。まあ、私はこれを世話しました。 https://github.com/esvit/ng-table/tree/master/demo-apps/es6-webpack

は、これは私のコードです:?

import angular from 'angular'; 
import angularMeteor from 'angular-meteor'; 
import uiRouter from 'angular-ui-router'; 
import template from './view1.html'; 
import angularCharts from 'angular-chart.js'; 
import ngTable from '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>' 
    }); 
} 

どのように私はこのエラーを解決することができ多分それはとは何かを持っている。しかし、それは私がここからngTableのための例で私に向い:-(作業をdoesntどのように私は$ NgTableParamsを注入

編集したい:。@Sajeetharanが言ったように私のコードを更新した後、私はこのエラーを取得する:

[$injector:modulerr] Failed to instantiate module main due to: 
Error: [$injector:modulerr] Failed to instantiate module view1 due to: 
Error: [$injector:modulerr] Failed to 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' is not a function, got Object 

は私に関連し、この誤差である私が見て?内部のモジュールのようなものは今エラーがあります:D。

EDIT2:

あなた(@Sajeetharan)の例のようにすべてのモジュールに引用符を追加した後:

[$injector:modulerr] Failed to instantiate module main due to: 
Error: [$injector:modulerr] Failed to instantiate module view1 due to: 
Error: [$injector:modulerr] Failed to instantiate module angularMeteor due to: 
Error: [$injector:nomod] Module 'angularMeteor' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. 
http://errors.angularjs.org/1.5.8/$injector/nomod?p0=angularMeteor 

を彼はもうアンギュラ流星を見つける傾けます! ngTablesを除くすべてのモジュールから引用符を削除しました。次に、私はこのエラーを受け取りました:

TypeError: $reactive is not a function 
at new View1 (http://localhost:3000/app/app.js?hash=cbd80421227e67667ccffb8b9f1fa2dd725c17fc:272:9) 
at Object.invoke (http://localhost:3000/packages/modules.js? 

私はいくつかのデータのためにヘルパーを使います。私は$ react:$reactive(this).attach($scope);でこれを行います。

テストのため、私は$ reactiveを削除しました。しかし、その後、彼はNgtableparamsがコンストラクタ-.-ではないことを、私に言っている:

TypeError: NgTableParams is not a constructor 
at new View1 (http://localhost:3000/app/app.js?hash=24ffbded787373a46d708b60a31466c47e1b756d:404:28) 
at Object.invoke (http://localhost:3000/packages/modules.js? 

私はあなたがあなたにngTableを注入する必要が

答えて

0

:-(あなたはまだ、すべてこのエラーで私を助けたい願っていますモジュール、

export default angular.module(name, [ 
'angularMeteor', 
'angularCharts', 
'uiRouter', 
'ngTable' 
]) 
+0

が!私は私の最初の記事を更新し、あなたの答えをいただき、ありがとうございます。残念ながら、それは新しいエラーがスローされます。エラー – tiga05

+0

を見てください、実際にあなたが引用 – Sajeetharan

+0

内の依存関係を配置する必要がありそう私は私のコードと私を更新最初の投稿。まだ動作していません.... – tiga05

関連する問題