This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { alpha, required, minLength } from "@rxweb/reactive-forms"; | |
export class User { | |
private _firstName: string = ""; | |
private _lastName: string = ""; | |
fullName!: string; | |
@required() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="text" id="userName" class="form-control" name="userName" | |
v-model="userFormGroup.props.userName" /> | |
<small class="form-text text-danger">{{userFormGroup.controls.userName.errorMessage}}</small> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="form-group"> | |
<label>User Name</label> | |
<input type="text" id="userName" class="form-control" name="userName" | |
v-model="userFormGroup.props.userName" /> | |
<div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, Prop, Vue } from 'vue-property-decorator'; | |
import { RxFormBuilder, IFormGroup } from "@rxweb/reactive-forms" | |
import { User } from "../models/user" | |
@Component | |
export default class SignUp extends Vue { | |
userFormGroup!: IFormGroup<User>; | |
formBuilder: RxFormBuilder = new RxFormBuilder(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ReactiveFormConfig, ClientLibrary } from '@rxweb/reactive-forms'; | |
ReactiveFormConfig.clientLib = ClientLibrary.Vue; | |
ReactiveFormConfig.set({ | |
validationMessage: { | |
required: "This Field is required", | |
..... | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
selectUser(user) { | |
// the user object json would be like : {name:"John" } | |
let message = RxTranslateModule.tranlate(this.multilingualContent.text.selectedRecord, user); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"selectedRecord": "You have selected record of '{name}'" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"conditionalText": "this.freeText == 'India' ? this.multilingualContent.indiaInfo : this.multilingualContent.worldInfo", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"indiaInfo": "India, officially the Republic of India, is a country in South Asia. It is the seventh-largest country by area, the second-most populous country, and the most populous democracy in the world.", | |
"worldInfo": "The World is Planet Earth and all life on it, including human civilization. In a philosophical context, the world is the whole of the physical Universe, or an ontological world.", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"userCityInfo": "The selected user City Name is: {{user.address.cityName}}" | |
} |
NewerOlder