[AngularJS] Re: Input radio (change) event not working in Angular

2019-01-22 Thread Riccardo Sadocchi
Hi, the event is type of MatRadioChange, you can access just with value (remove target) and you set the value like this: this.signUpForm.get('gender').setValue(event.value); Il giorno lunedì 21 gennaio 2019 19:34:01 UTC+1, Robert Gomez ha scritto: > > I have a form using Reactive Form and Angula

[AngularJS] Re: Need a function to remove selected options from other select

2018-10-23 Thread Riccardo Sadocchi
Ciao Fabrizio, eccoti un esempio funzionante, forse dovrai aggiustarlo in base alle tue esigenze ma è sicuramente un punto di partenza. Di seguito il contenuto del file app.ts modificato del tuo esempio in plnkr: //our root app component import { Component, NgModule, VERSION } from '@angular/core

[AngularJS] Re: Need a function to remove selected options from other select

2018-10-22 Thread Riccardo Sadocchi
Ciao Fabrizio, secondo me è l'approccio errato, prova a creare un oggetto {selectID:string, options:ComboItem[]}[] e lo popoli mettendo degli id univoci ad ogni tag select, poi nella (change) passi non $event.target.value, ma solo $event.target in modo da leggere l'id della select che ha scaten

[AngularJS] Re: I cannot post data to back end from angular6

2018-10-21 Thread Riccardo Sadocchi
Hi, try to modify the return type of store1 function from Observable to Observable or Observable. Il giorno giovedì 18 ottobre 2018 13:19:24 UTC+2, chinelo...@gmail.com ha scritto: > > Am trying to post data to php backend and display json call response > message *success* but am having the fo

[AngularJS] Re: How to Append data to array in angularjs ?

2018-10-16 Thread Riccardo Sadocchi
The right syntax to initialize an empty array is schedule:any=[]; //or schedule: objectType[] =[]; and to add elements this.schedule.push(yourItem); Il giorno martedì 16 ottobre 2018 07:33:24 UTC+2, Pathum Lakshan ha scritto: > > > Here i have two array's, > schedule: any = {}; > tempschedule

[AngularJS] Re: Lock a Div

2018-10-06 Thread Riccardo Sadocchi
You can choose some way to have this behavior, disable scroll via javascript is one, you can conditioning some div with *ngIf , go to next step with button after name input is valued... Il giorno sabato 6 ottobre 2018 19:27:11 UTC+2, Tamanbir Singh ha scritto: > > So i wanted to build a website,

[AngularJS] Re: Mat-Stepper - How to use the Linear Mode?

2018-10-05 Thread Riccardo Sadocchi
Can you post the mat-stepper and form code? Il giorno venerdì 5 ottobre 2018 18:05:36 UTC+2, Partha Majumdar ha scritto: > > > Dear Sir/Madam, > > I have defined a set of steps. Now, my program is working perfectly after > a few days of struggle. > > However, I have set Linear Mode === false. >

[AngularJS] Re: Mat-Stepper - How to use the Linear Mode?

2018-10-05 Thread Riccardo Sadocchi
It depends on the action that the user has to do in each step, if you have a form to jump in next step the form must be valid Il giorno venerdì 5 ottobre 2018 18:05:36 UTC+2, Partha Majumdar ha scritto: > > > Dear Sir/Madam, > > I have defined a set of steps. Now, my program is working perfectly

[AngularJS] Re: Insert dynamically create component after clicked row

2018-09-28 Thread Riccardo Sadocchi
Hi Janak, i think this is a very complex strategy, you can use a component with a table binded in a simple array of object with the data you need, on click you can add an object to the array and the table update dynamically public dataViewModel:{col1:string, col2:string, col3:string} [] = []; /

[AngularJS] Re: [(ngModel)] value from json

2018-09-28 Thread Riccardo Sadocchi
Hi, try the changes below > > > ="inputs.metadatas.indexOf(input)" > name="'name_' + inputs.metadatas.indexOf(input).toString()"> > > > > I'm not sure it works, and is not the right way, you should use a > FormGroup (no ngModel) and in the html

[AngularJS] Re: Angular6 Material Dialog passing data

2018-09-28 Thread Riccardo Sadocchi
Hi try the changes below > > > @ngModule: > ... > > entryComponents: [DeleteDialogComponent] > > myComponent: > > openDialog(){ > let dialogRef = this.dialog.open(DeleteDialogComponent > , { > width: '250px', > data: {deviceToDelete: this.selectedDevice} > }); > > dialogRef.after

[AngularJS] Re: how to set focus to a specific eleent

2018-09-28 Thread Riccardo Sadocchi
Hi Jose, you can try to bind the html autofocus attribute to a boolean value Il giorno giovedì 27 settembre 2018 20:51:25 UTC+2, José Vilmar Estácio de Souza ha scritto: > > Hi all. > > Probably a dumb question, but how can I set focus to an element using > angular 6? > > I'd like to set foc

[AngularJS] Re: angular 6 - Lost username when refresh F5 (but still logged)

2018-09-28 Thread Riccardo Sadocchi
Hi Belén, i think you can resolve whit a simple variable in your service. Try some changes // AuthenticationService: // currenUser$: Subject = new Subject(); public currentUser:User; // in the map on success this.currentUser = user; //in ngOnInit of AppComponent if (this._autenticationService.cu

[AngularJS] Re: How to read a file from Material Modal pop up.

2018-09-25 Thread Riccardo Sadocchi
You can use a object, only the posted file or more complex: when you close the dialog //case ok this.dialogRef.close({action: 'ok', model: this.postedFile }); //or case cancel this.dialogRef.close({action: 'cancel', model: null }); and in the 'container' component this.dialogRef.beforeClose

[AngularJS] Re: Dialog does not open

2018-09-22 Thread Riccardo Sadocchi
Hi (again...), You can catch the operation result of the dialog, for example you just use this.dialogRef.close('ok') or ('error') or ('cancel') and after the function to open the dialog you can use something like this this.dialogRef.beforeClose().subscribe(action => { switch (action) { ca

[AngularJS] Re: Dialog does not open

2018-09-22 Thread Riccardo Sadocchi
Hi, try to inject the dialog into the constructor //...some code selectedCurrency: Currency; //public dialog: MatDialog; constructor(public currencyService: CurrencyService, public dialog: MatDialog) {} //... some code Il giorno sabato 22 settembre 2018 17:43:29 UTC+2, Partha Majumdar ha

[AngularJS] Re: Best way to persist variable between two sessions

2018-09-21 Thread Riccardo Sadocchi
@Input is used to pass some value from a container component to child component //... some code "from one screen to other" ? Il giorno venerdì 21 settembre 2018 17:57:51 UTC+2, Sudhir Kumar ha scritto: > > Hi All! > > What is the best way to persist variable/data between two sessions

[AngularJS] Re: How to read a file from Material Modal pop up.

2018-09-21 Thread Riccardo Sadocchi
when you close the dialog use something like this this.dialogRef.close('ok') and then use beforeClosed (not afterClosed): this.dialogRef.beforeClose() .subscribe(actionType => { switch (actionType) { case 'ok': { *//TODO: .*

[AngularJS] Re: How to live build an angular workspace project

2018-09-21 Thread Riccardo Sadocchi
I'm not sure to right understend your question, but when you develop the application (like debug mode) you run the ng serve, after, when app is ready to publish, you can run ng build --prod to rebuild the dist folder with all new feature and fix Il giorno venerdì 21 settembre 2018 13:24:50 UTC+