How to get Nativescript-drop-down working on your angular app


When I first tried installing the Nativescript-drop-down plugin, I had this issues:

JS: Error: Uncaught (in promise): Error: Error in pages/custom_goal/custom_goal.html:49:8 caused by: Could not load view for: DropDown.Error: com.tns.NativeScriptException: Failed to find module: "nativescript-drop-down/drop-down",


node_modules/nativescript-drop-down/drop-down.d.ts(40,14): error TS2304: Cannot find name     'UILabel'.

node_modules/nativescript-drop-down/drop-down.d.ts(41,18): error TS2503: Cannot find namespace ‘android’.

Solution to this will be removing

ios: UILabel;
android: android.widget.Spinner;

from the drop-down.d.ts file in your node_modules/nativescript-drop-down folder.

now uninstall the app from your device and re-install. This should work.