## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• Apr 21 10:06
prince-developer-csharp commented #484
• Apr 21 08:37
afzalmansuri commented #487
• Apr 21 07:55
ajayojha commented #484
• Apr 21 07:35
ajayojha commented #488
• Apr 21 07:33
ajayojha closed #481
• Apr 21 07:33
ajayojha commented #487
• Apr 21 07:32
ajayojha commented #488
• Apr 20 13:39
rachanachag edited #488
• Apr 20 13:38
rachanachag opened #488
• Apr 19 07:56
afzalmansuri opened #487
• Apr 16 02:07
mineminemine opened #486
• Apr 15 09:31
Hesesses opened #485
• Apr 12 12:13
prince-developer-csharp opened #484
• Apr 11 10:05
Serene47 edited #483
• Apr 11 10:05
Serene47 edited #483
• Apr 11 10:05
Serene47 edited #483
• Apr 11 10:04
Serene47 edited #483
• Apr 11 10:03
Serene47 opened #483
• Apr 09 06:21
ajayojha commented #475
• Apr 09 06:10
Kiran-Pawar commented #475
afzalmansuri
@afzalmansuri
Hello @ajayojha Sir, can you please look into this ticket: rxweb/rxweb#454
Ajay Ojha
@ajayojha
@afzalmansuri will be released today
afzalmansuri
@afzalmansuri
ok sir thanks for the update
afzalmansuri
@afzalmansuri
Hello @ajayojha Sir any update for the ticket: rxweb/rxweb#454
Ajay Ojha
@ajayojha
Sorry, @afzalmansuri, was a bit busy with other work, It will be released today.
freshdev1
@freshdev1
Hello everybody. I recently faced an issue which is something I would like anyone to help me understand....
My application was using NGX-translate and I replaced it with @rxweb translation extension
export function HttpLoaderFactory(http: HttpClient) {
}

TranslateModule.forRoot({
defaultLanguage: 'en',
deps: [HttpClient]
}
}),
This was the configuration earlier.
freshdev1
@freshdev1
I looked at the guide on the website and removed all of this and changed it to:
TranslateModule.forRoot({
globalFilePath: './assets/i18n/{{language-code}}.json',
now this used to work fine on local, but wouldn't work when deployed on my server.

then I loaded TranslateHttpLoader from @rxweb module and rewrote the above export function as:

export function HttpLoaderFactory(http: HttpClient) {
}

It still failed. Since the application was hosted in a virtual directory:

freshdev1
@freshdev1
Then I reimported the TranslateHttpLoader from ngx-translate this time passing it to TranslateModule of @rxweb extension. And everything started to work as expected.
import { TranslateModule, TranslateLoader } from "@rxweb/ngx-translate-extension";

}

TranslateModule.forRoot({
deps: [HttpClient]
}
}),
Can anyone tell me why this is an issue? I do not happen to understand the cause.
this is the final code i am having.
Ajay Ojha
@ajayojha
@freshdev1 I need to reproduce this in my local, then after will let you know. Overall it's doing the same thing without creating the custom loaderfactory.
Kiran-Pawar
@Kiran-Pawar
Hello @ajayojha can you please update me on this ticket - rxweb/rxweb#451
Hi @ajayojha
I am referring to this command to add domain controller : rxwebcore --controller domain --main master --uow Master , but i am facing issue to add manually models , import files , add a interface for domain etc. Also when i am adding view model using command in Models , it's give me error of KeyLessEntity name space error which is already given name space for RxWeb.Core.Data.Annotations.
Ushmidave
@Ushmidave
@radixdt2020 which CLI version are you using ?
CLI version is 9.1.7
Do you asking me angular cli version or rxwebcore?
Ushmidave
@Ushmidave
rxwebcore cli
How to check rxwebcore cli version?
Ushmidave
@Ushmidave
@radixdt2020 check this path there will be the installed package version number C:\Users\<username>.dotnet\tools.store\rxwebcore
Package version is 1.2.2
Ushmidave
@Ushmidave
@radixdt2020 kindly install the version 1.1.6 and check the same
Nikunj V Kalathiya
@kalathiyan
is there any way to pass multiple values in start with Validator ?
like i need to validate string start with AA OR BB then how to do that ?
TutoDS
Hi guys
I have this error when I try using Rxwebvalidators on my angular project
anyone can help me?
already try reinstall node_modules, but no success
I'm using Angular CLI: 11.0.5
TutoDS
Anyone?
freshdev1
@freshdev1
@tutods_twitter I think last supported version is Angular 10 for RxWebValidators. Ajay will confirm.
freshdev1
@freshdev1

guys I am trying to implement RxWebValidators.... Following is my model class I'm using:

import { propObject, required } from '@rxweb/reactive-form-validators';
import { DocumentSubmission } from './document-submission.model';
import { TenantContractDetails } from './tenant-contract-details.model';
import { TenantContractGeneralInformation } from './tenant-contract-general-information.model';

export class TenantContract {
@propObject(TenantContractGeneralInformation)
BasicInformation: TenantContractGeneralInformation = new TenantContractGeneralInformation();

@propObject(TenantContractDetails)
TenantContractDetails: TenantContractDetails = new TenantContractDetails();

@propObject(DocumentSubmission)
TenantContractDocuments: DocumentSubmission = new DocumentSubmission();
}

FormGroups are created in the following way:

  createFormGroup(): void {
this.contractForm = this.formBuilder.group(
// {
//   BasicInformation: this.formBuilder.formGroup(new TenantContractGeneralInformation()),
//   TenantContractDetails: this.formBuilder.formGroup(new TenantContractDetails()),
//   TenantContractDocuments: this.formBuilder.formGroup(new DocumentSubmission())
// }
new TenantContract()
);
console.log(this.contractForm);
}
If I create formgroups this way none of the required or other errors are fired. If I create it the way which is commented out, all errors works as expected
Any ideas as to why this is happening.
In the above case all the formgroups have VALID Status. Do not understand as to why this is happening.
Ajay Ojha
@ajayojha
@freshdev1 As I can see that you are creating a FormGroup through model then it's preferable to use 'formGroup' method instead of 'group' method.
@tutods_twitter there is one alternative to make this work as I provided a solution in the past to someone, but I forgot what was that, will update soon.
@kalathiyan will update you soon.
Ushmidave
@Ushmidave
@kalathiyan passing or string value is not possible using startsWith validator you can create a feature request for the same
freshdev1
@freshdev1
@ajayojha thanks for the response, it worked. I did remember I used formGroup first but it was not working. But this works now. Thanks a lot sir.
@Ushmidave Still not face any issue in rxwebcore version 1.1.6.
Ushmidave
@Ushmidave
@radixdt2020 What issue are you facing now ?
freshdev1
@freshdev1
Hello everyone. Any idea if I can disable the whole formGroup based on a condition through model decorator?
I tried to apply disable using the @model decorator but it doesn't work.
disable is not a supported I believe.
freshdev1
@freshdev1

@ajayojha This do not work:

export class TenantContractGeneralInformation {

@disable({conditionalExpression:function(control:AbstractControl){return true; }})
@prop()
ContractNumber: string = '';

@disable({conditionalExpression:function(control:AbstractControl){return true; }})
@prop()
ExternalContractNumber: string = '';

AccountGUID: string = '';

@required({ message: "FIELD_REQUIRED" })
WorkerCity: string = '';

Any intended reason behind this? How do we mark fields as disabled if we want to without a second property.