Hello,
I have a drop down selection menu in my data entry form that displays a
list of users and the default user is set to the user who's logged in, see
image. For this post the test user is testUserLoggedIN = 4. and this works.
The next step, is have the the first name and the last name appear above
the selection menu whether its the default user or a user based on the
dropdown menu selection:
(<label class="control-label" for="userList">selection: (Default
user :{{'first name last name'}} )</label>.
I tried searched but couldn't find what Im looking for and tried few
binding methods but I'm still missing something.
*Any help you can provide would be greatly appreciated..*
*component.html*
<div class="form-group">
<label class="control-label" for="userList">selection: (Default user :{{'first
name lastname'}} )</label>
<select class="form-control" formControlName="userList" >
<option *ngFor="let user of getUserList" [value]="user.usr_index">
{{user.usr_firstname}} {{user.usr_lastname}}
</option>
</select>
</div>
*part of component.ts*
private testUserLoggedIN: number = 4;
ngOnInit(){
this.testForm = this._fb.group({
userList: [this.testUserLoggedIN, Validators.required]
});
<https://lh3.googleusercontent.com/-QytfAXkzKNg/WNw-jQWgPqI/AAAAAAAABJ0/F8GNM060kW0CQyXoS8NyRznItszLU5ctwCLcB/s1600/testimage.PNG>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.