Comments (3)
This can be done when creating a new instance of a component:
<lui-button onclick="onClickHandler"></lui-button>
However this cannot be done for one common use case: Most of the components in an app will inherit the wrapper div tag of Lui.Component. Hence they cannot add onclick etc to the wrapper div. So this feature wouldn't satisfy a common use case of a component trying to add event handlers to it's own root element (for components inheriting templates). So a JS solution is still required for this.
So I am thinking whether to have two ways to do similar things...hmmm.
from lithium-ui.
Within component template, are events supported like with syntax like this ?
<input type="button" value="Submit" on-click="handleClick()">
from lithium-ui.
- Also for custom-events fired by component, you should have provision to assign callback by container.
- Can container refer to component by object and call its methods ?
from lithium-ui.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lithium-ui.