Giter VIP home page Giter VIP logo

Comments (2)

bradmartin avatar bradmartin commented on May 27, 2024

Looks like you might be registering the wrong package

registerElement("PullToRefresh", () => require("nativescript-pulltorefresh").PullToRefresh);

use the @nstudio/... scoped version

from nativescript-pulltorefresh.

alvmarcoux avatar alvmarcoux commented on May 27, 2024

Thanks for the answer.
I had already tried that, because i saw it in the "Usage" section. I changed it again, now this is my main.ts:

// this import should be first in order to load some required settings (like globals and reflect-metadata)
import { registerElement } from "nativescript-angular/element-registry";
import { platformNativeScriptDynamic } from "nativescript-angular/platform";
import { AppModule } from "./app/app.module";
registerElement("PullToRefresh", () => require("@nstudio/nativescript-pulltorefresh").PullToRefresh);
// registerElement("PullToRefresh", () => require("nativescript-pulltorefresh").PullToRefresh);
platformNativeScriptDynamic().bootstrapModule(AppModule);

the rest of my code is the same, but im still having an error. However i see that is different:

 ERROR Error: Uncaught (in promise): TypeError: Could not load view for: PullToRefresh.TypeError: _nativescript_core__WEBPACK_IMPORTED_MODULE_0__.Property is not a constructor
JS: TypeError: Could not load view for: PullToRefresh.TypeError: _nativescript_core__WEBPACK_IMPORTED_MODULE_0__.Property is not a constructor
JS:     at Object.getViewClass (file: node_modules\@nativescript\angular\element-registry.js:84:0)
JS:     at ViewUtil.push.../node_modules/@nativescript/angular/view-util.js.ViewUtil.createView (file: node_modules\@nativescript\angular\view-util.js:214:0)
JS:     at NativeScriptRenderer.push.../node_modules/@nativescript/angular/renderer.js.NativeScriptRenderer.createElement (file: node_modules\@nativescript\angular\renderer.js:138:0)
JS:     at DebugRenderer2.push.../node_modules/@angular/core/fesm5/core.js.DebugRenderer2.createElement (file: node_modules\@angular\core\fesm5\core.js:30377:0)
JS:     at createElement (file:///data/data/org.nativescript.Mydrawer...

from nativescript-pulltorefresh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.