PolymerTS | Write Polymer 1.0 elements as TypeScript @ decorated classes | Web Framework library
kandi X-RAY | PolymerTS Summary
kandi X-RAY | PolymerTS Summary
Write Polymer 1.x elements as TypeScript @decorated classes. NOTE: If you need to support Polymer 2.x or higher, see the official PolymerDecorators project. We will be working on providing a migration path for users that are currently using Polymer 1.0 and PolymerTS. To find out more (or help!), see issue #110.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of PolymerTS
PolymerTS Key Features
PolymerTS Examples and Code Snippets
Community Discussions
Trending Discussions on PolymerTS
QUESTION
I tried to create and use my own behavior according to the PolymerTS docs, but an Uncaught ReferenceError
is thrown (ListViewBehavior
is not defined).
This is my behavior (list-view/list-view-behavior.ts
):
ANSWER
Answered 2017-Jan-20 at 13:03I just tried your code. Interestingly, defining the ListViewBehavior
class without exporting it allows the build to succeed without warnings or errors. The ReferenceError
occurs at runtime when I try to create the component that uses the behavior.
The fix was to add this import to my component's class file:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install PolymerTS
polymer-ts.html the html file to include via <link rel="import"> that loads PolymerTS
polymer-ts.min.html the html file to include via <link rel="import"> that loads PolymerTS (minified version)
polymer-ts.d.ts the file to reference in your TypeScript code (/// <reference path="...">)
polymer-ts.ts the source TypeScript file for debugging purposes
polymer-ts.js or polymer-ts.min.js the JavaScript file if you want to include PolymerTS via <script src="">
Clone this repo
Make sure you have node and bower installed.
Run npm install && bower install
To build, just run npm run build. During development, using the TypeScript compiler settings in your editor should work fine, as long as it points to ./tsconfig.json and uses the version of tsc installed in node_modules.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page