Nativescript-ui-feedback: RadListView throwing an error NullInjectorError: No provider for RadListViewComponent!

Created on 28 May 2018  路  3Comments  路  Source: ProgressNS/nativescript-ui-feedback

Please take a minute to read our NativeScript Code of Conduct before proceeding with posting issues or discussing. The purpose of this guide is to make communication and cooperation within our forums a pleasure for you and the other members.

Please, provide the details below:

Did you verify this is a real problem by searching the NativeScript Forum?

Yes

Tell us about the problem

RadListView throwing an error when showing modal dialog by tap of item.

Which platform(s) does your issue occur on?

Both

Please provide the following version numbers that your issue occurs with:

  • Progress NativeScript UI version: latest version
  • CLI: 4.0.2 (run tns --version to fetch it)
  • Cross-platform modules: latest (the version of tns-core-modules in the package.json)
  • Runtime(s): 4.0.1 (the "tns-android" and "tns-ios" properties in the package.json)

Please tell us how to recreate the issue in as much detail as possible.

  1. By Clicking on item, we are showing modal dialog using modal dialog component. We had listview it's working fine with listview.

StaticInjectorError(AppModule)[TKListViewItemDirective -> RadListViewComponent]: \n StaticInjectorError(Platform: core)[TKListViewItemDirective -> RadListViewComponent]: \n NullInjectorError: No provider for RadListViewComponent!

Stack trace:
get@file:///app/tns_modules/@angular/core/bundles/core.umd.js:1041:28 [angular]\nresolveToken@file:///app/tns_modules/@angular/core/bundles/core.umd.js:1339:27 [angular]\ntryResolveToken@file:///app/tns_modules/@angular/core/bundles/core.umd.js:1281:28 [angular]\nget@file:///app/tns_modules/@angular/core/bundles/core.umd.js:1149:35 [angular]\nresolveToken@file:///app/tns_modules/@angular/core/bundles/core.umd.js:1339:27 [angular]\ntryResolveToken@file:///app/tns_modules/@angular/core/bundles/core.umd.js:1281:28 [angular]\nget@file:///app/tns_modules/@angular/core/bundles/core.umd.js:1149:35 [angular]\ncreateClass@file:///app/tns_modules/@angular/core/bundles/core.umd.js:12521:39 [angular]\ncreateDirectiveInstance@file:///app/tns_modules/@angular/core/bundles/core.umd.js:12364:48 [angular]\ncreateViewNodes@file:///app/tns_modules/@angular/core/bundles/core.umd.js:13822:76 [angular]\ncallViewAction@file:///app/tns_modules/@angular/core/bundles/core.umd.js:14256:28 [angular]\nexecComponentViewsAction@file:///app/tns_modules/@angular/core/bundles/core.umd.js:14165:27 [angular]\ncreateViewNodes@file:///app/tns_modules/@angular/core/bundles/core.umd.js:13850:29 [angular]\ncreateRootView@file:///app/tns_modules/@angular/core/bundles/core.umd.js:13711:20 [angular]\ncallWithDebugContext@file:///app/tns_modules/@angular/core/bundles/core.umd.js:15136:47 [angular]\ncreate@file:///app/tns_modules/@angular/core/bundles/core.umd.js:11316:60 [angular]\ncreateComponent@file:///app/tns_modules/@angular/core/bundles/core.umd.js:11513:68 [angular]\nloadInLocation@file:///app/tns_modules/nativescript-angular/common/detached-loader.js:21:61 [angular]\nloadComponent@file:///app/tns_modules/nativescript-angular/common/detached-loader.js:38:35 [angular]\nshowDialog@file:///app/tns_modules/nativescript-angular/directives/dialogs.js:67:49 [angular]\nfile:///app/tns_modules/nativescript-angular/directives/dialogs.js:32:53 [angular]\nonInvokeTask@file:///app/tns_modules/@angular/core/bundles/core.umd.js:4789:43 [angular]\ninvoke@file:///app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:460:45 [angular]\ntimer@file:///app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:1636:34 [angular]\ninvoke@file:///app/tns_modules/tns-core-modules/timer/timer.js:54:53 [angular]\nonInvoke@file:///app/tns_modules/@angular/core/bundles/core.umd.js:4798:39 [angular]\ntick@file:///app/tns_modules/tns-core-modules/timer/timer.js:19:26 []\nUIApplicationMain@[native code] []\nstart@file:///app/tns_modules/tns-core-modules/application/application.js:264:26 []\nbootstrapApp@file:///app/tns_modules/nativescript-angular/platform-common.js:86:28 []\nbootstrapModule@file:///app/tns_modules/nativescript-angular/platform-common.js:72:26 []\nanonymous@file:///app/main.js:34:57 []\nevaluate@[native code] []\nmoduleEvaluation@[native code] []\n[native code] []\npromiseReactionJob@[native code] []

needs more info

Most helpful comment

I found the problem. Documentation in this link is not clear enough. I though that I need to replace RadListView tag with ListViewGridLayout as it looks like a different element. Instead this element should be placed inside the RadListView tag:

<ListViewStaggeredLayout tkListViewLayout scrollDirection="Vertical" spanCount="1"> . 
</ListViewStaggeredLayout>

This is not very intuitive and documentation is not clear enough.

All 3 comments

Hi @spmamidi,
Can you check if you will have the same issue while using the latest NativeScript 4.1? You can review our update instructions. If the problem persists, please provide sample project, which could be used for debugging.

@spmamidi I also have this problem. How did you fix it?
I use Nativescript 4.1 btw.

I found the problem. Documentation in this link is not clear enough. I though that I need to replace RadListView tag with ListViewGridLayout as it looks like a different element. Instead this element should be placed inside the RadListView tag:

<ListViewStaggeredLayout tkListViewLayout scrollDirection="Vertical" spanCount="1"> . 
</ListViewStaggeredLayout>

This is not very intuitive and documentation is not clear enough.

Was this page helpful?
0 / 5 - 0 ratings