angular


how to get the value of a custom element with angular 2


I have this, https://embed.plnkr.co/xXt9wKs7jzpaivQeLjbx/
the calendar is my custom component, but if I show
{{dateValue | date:"yyyy/MM/dd"}}
this is not getting the selected date I am choosing in my calendar.
How can I get this?
Add #Output property to your FxDatePickerComponent:
#Output() valueChange: EventEmitter<Date> = new EventEmitter();
then you can use two-way binding in template:
<fx-datepicker [(value)]="dateValue"></fx-datepicker>
Plunker Example
.Have you tried somethng like:
in your (app.component.html) HTML:
(dateModelChange)="countChange($event)"
In your TS (App.compoment.ts):
countChange(event){
this.dateValue=event;
}
Cuase you need to declare also the 'listener' to the #output property .. so you're right to declare :
#Output() dateModelChange: EventEmitter<Date> = new EventEmitter();
In your sub component .. but you'have also to declare a listener to it in the parent component

Related Links

After using “ionic run android” to deploy the app to phone, still exists the cross-domain?
Chat App not proper work in angularfire2
onClick function in Chart.js passing the selected object, Typescript
You may need an appropriate loader to handle this file type. Typescript
when i run npm i got this error. how to fix this?
Angular2 add nativeElement to component's prototype
Property 'value' does not exist on type 'ElementRef'
Getting all routes from current module - Angular 2
Ionic 2 Cache issue with tabs application
Set selected option by default on angular template
Downloading Redux State into an Angular 2 component and then iterating over its result
How to push on FormArray without FormBuilder on Angular 2
Angular 2, Uncaught Type Error: Cannot read property 'Injectable' of undefined
Set width to an Angular2-modal window
identityserver4 angular client, from where come the call to this endpoint
Angular2 translation after subscribing to service

Categories

HOME
menu
perl
entities
speech-recognition
opentsdb
strongswan
chat
ejb
batch-normalization
markup
rinsim
bootstrap-select
gun
greedy
ssrs-2016
bug-tracking
indexoutofrangeexception
autoload
uppaal
maxlength
uilabel
spacing
pdb-files
jqassistant
omnipay
grunt-connect-proxy
ecore
crossfilter
psftp
hana-cloud-platform
audiokit
card-flip
sphero-api
actor
watchdog
nsset
preferencefragment
canvas-lms
orika
tinyxml2
opensmtpd
live-connect-sdk
smartmeter
android-7.1-nougat
sqlcommand
simplehttpserver
leap-motion
google-chrome-arc
itil
ldflags
pandorabots
post-commit
plone-4.x
anthill
liquibase-hibernate
pragma
ng-template
mongoose-web-server
payara
dynamics-nav-2009
angular-ui-tree
fileapi
merit-gem
moovweb
savefiledialog
ttml
grunt-contrib-cssmin
desktop-shortcut
member
code-metrics
kiwi
jform-designer
updatemodel
activator
worklight-studio
resourcedictionary
yepnope
iunknown
xadisk
ipad-2
strtotime
clang-complete
plcrashreporter
google-doodle
nsenumerator
installshield-2008
maintenance-plan
pdc2008

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile