A component in the Unified Modeling Language "represents a modular part of a system, that encapsulates its content and whose manifestation is replaceable within its environment. A component defines its behavior in terms of provided and required interfaces". The best example of component can be found in ActionScript- Flash,Flex sdks. There you have UI components like buttons, labels, DataGrids, charts those are reusable, distributable etc.
Questions tagged [components]
11658 questions
295
votes
15 answers
What does OSGi solve?
I've read on Wikipedia and other sites about OSGi, but I don't really see the big picture. It says that it's a component-based platform, and that you can reload modules at runtime. Also the "practical example" given everywhere is the Eclipse Plugin…

Pablo Fernandez
- 103,170
- 56
- 192
- 232
285
votes
11 answers
Manually Set Value for FormBuilder Control
This is driving me nuts, I'm under the gun and can't afford to spend another whole day on this.
I am trying to manually set a control value ('dept') within the component, and it's just not working - even the new value logs to console properly.
Here…

Matthew Brown
- 4,876
- 3
- 18
- 21
276
votes
7 answers
What's the difference between an Angular component and module
I've been watching videos and reading articles but this specific article make me so confused, at the start of the article it says
The applications in Angular follow modular structure. The Angular apps will contain many modules, each dedicated to…

Luis Pena
- 4,132
- 2
- 15
- 23
263
votes
9 answers
React component initialize state from props
In React, are there any real differences between these two implementations?
Some friends tell me that the FirstComponent is the pattern, but I don't see why. The SecondComponent seems simpler because the render is called only once.
First:
import…

Levy Moreira
- 2,733
- 2
- 14
- 10
224
votes
13 answers
How to manage Angular2 "expression has changed after it was checked" exception when a component property depends on current datetime
My component has styles that depend on current datetime. In my component I've got the following function.
private fontColor( dto : Dto ) : string {
// date d'exécution du dto
let dtoDate : Date = new Date( dto.LastExecution );
(...)
…

Anthony Brenelière
- 60,646
- 14
- 46
- 58
159
votes
4 answers
In C#, can a class inherit from another class and an interface?
I want to know if a class can inherit from a class and an interface.
The example code below doesn't work but I think it conveys what I want to do.
The reason that I want to do this is because at my company we make USB, serial, Ethernet, etc device.…

PICyourBrain
- 9,976
- 26
- 91
- 136
158
votes
10 answers
React showing 0 instead of nothing with short-circuit (&&) conditional component
I have the following simple short-circuit statement that should show either a component or nothing:
{profileTypesLoading && }
If the statement is false, it renders a 0 instead of nothing.
I have done a…

Gurnzbot
- 3,742
- 7
- 36
- 55
150
votes
24 answers
How to Refresh a Component in Angular
I am working on an Angular project. I'm struggling with refresh action in a component.
I would like to refresh the router's components on button click.
I have refresh button when I click on it the component/router need to be refresh.
I tried…

Sreehari Ballampalli
- 3,404
- 3
- 12
- 19
112
votes
14 answers
Property 'fName' comes from an index signature, so it must be accessed with ['fName']
These are my files. I am getting this error can someone help me.
Error: src/app/app.component.html:5:123 - error TS4111: Property 'fName' comes from an index signature, so it must be accessed with ['fName'].

Chaitanya Chitturi
- 1,129
- 2
- 7
- 8
98
votes
2 answers
Disable Button in Angular 2
I want if the input 'Contract type' is empty, the button 'Save' is not clickable
Save button:
ALL Buttons:
user7325116
96
votes
8 answers
What is the difference between component and directive?
I have just started working with Angular 2.
I was wondering what are the differences between components and directives in Angular 2?

uksz
- 18,239
- 30
- 94
- 161
95
votes
11 answers
Angular 4 - get input value
I would like to know how to get the value from an input on angular 4.
I looked over the documentation on angular and the example with the key event doesn't work very well for me and I can't find a proper example how to do this so please help me…

Daniel Bisceanu
- 1,117
- 1
- 9
- 15
91
votes
2 answers
Angular2 Component @Input two way binding
I have a data driven Angular application. I have a toggle component which I pass in a toggled state. My issue is that the two way data binding does not seem to work unless i pass in the toggle boolean as an object. Is there a way to get this to…

Steve Fitzsimons
- 3,754
- 7
- 27
- 66
89
votes
4 answers
Vue - how to pass down slots inside wrapper component?
So I've created a simple wrapper component with template like:
using $attrs and $listeners to pass down props and events.
Works fine, but how can the wrapper proxy the…

user3599803
- 6,435
- 17
- 69
- 130
88
votes
11 answers
react-select: how to keep dropdown open when styling in inspector?
I'm using react-select and I'm customizing it,I didn't found an option to do this. Is there some workaround I can use to keep dropdown open when I'm styling it?

lucasviewup
- 881
- 1
- 6
- 4