Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 08 10:41
    rxcontributorone opened #497
  • Jun 08 10:37

    rxcontributorone on Development

    add : new Hr Management System … (compare)

  • Jun 07 16:38
    mohanskumar opened #496
  • Jun 07 09:35
    Ushmidave opened #495
  • Jun 07 09:24
    Ushmidave opened #494
  • Jun 04 00:05
    peterje commented #492
  • Jun 02 18:06
    simfyz commented #482
  • Jun 02 17:31
    simfyz commented #474
  • May 25 10:24
    ajayojha milestoned #465
  • May 25 10:24
    ajayojha milestoned #447
  • May 25 10:15
    ajayojha milestoned #471
  • May 25 10:12
    ajayojha milestoned #483
  • May 25 10:12
    ajayojha milestoned #485
  • May 25 10:10
    ajayojha milestoned #486
  • May 25 10:10
    ajayojha labeled #492
  • May 25 10:06
    ajayojha milestoned #493
  • May 25 10:06
    ajayojha milestoned #446
  • May 25 10:05
    ajayojha milestoned #432
  • May 25 10:04
    ajayojha closed #436
  • May 25 10:04
    ajayojha milestoned #436
Ajay Ojha
@ajayojha
while using the shared component have you used *rxTranslate directive ?
rachanachag
@rachanachag
yes
image.png
Please check the screenshot, other than breadcrumb all labels are multilingual.
And this issue('loading') as text only occurs on refresh after 3-4 times
Ajay Ojha
@ajayojha
the 'loading' text will be coming when the key is not available in the respective translation key
rachanachag
@rachanachag
yes but if key is not available , than it should not display for the first time as well
Ajay Ojha
@ajayojha
if possible then reproduce the same in the stackblitz or create a small angular project for this issue
rachanachag
@rachanachag
As this scenario is happening only in some cases, I am sharing a gif with you.
look here
Ajay Ojha
@ajayojha
I do understand the problem, but without minimal code snippet with reproducing steps, it's a bit difficult for me to provide you an effective solution.
rachanachag
@rachanachag
@ajayojha , I will try to create stackblitz to reproduce the issue
De Giovanni
@tamyfabius

Hello everybody,
I have to check a field of a model against the model itself, but asynchronously.
And to check this field on the server side I must pass the model itself as the 1st parameter of the service and the name of the field I want to check as the 2nd parameter.

Can I inject a service at the constructor level of my model to use the service that makes the call to the server?

Ajay Ojha
@ajayojha

Can I inject a service at the constructor level of my model to use the service that makes the call to the server?

Yes, you can inject the service at the constructor level.

rachanachag
@rachanachag

Stackblitz

Hello @ajayojha, I have tried to reproduce the same issue in the above example, In this case, also breadcrumb loading is showing sometimes only.
But I am not able to show exactly the same issue which is shown in above-shared gif.

rachanachag
@rachanachag
image.png
Hello @ajayojha , I am getting below error in the page I am using rx-translate. could you please help me with this?
rachanachag
@rachanachag
hello @ajayojha, We want to use encryption-decryption in URL/parameters for our angular project. Is there any way to achieve this in RX-architecture?
Ajay Ojha
@ajayojha
Put a “if” clause in the method of ng destroy
rachanachag
@rachanachag
@ajayojha yes, I have put 'if' condition
Ajay Ojha
@ajayojha
Then the error won’t occur
mitanshu-patel
@mitanshu-patel
Hello @ajayojha , can you please provide help regarding this ticket: rxweb/rxweb#414
Ajay Ojha
@ajayojha
@mitanshu-patel I have fixed this in the earlier version (I am not sure, let me check), will update here after some time.
Ajay Ojha
@ajayojha
mitanshu-patel
@mitanshu-patel
@ajayojha ok thanks for example. Will check it and update you soon
Nils Wild
@NilsWild

Hi,

createFormGroupWithBuilder() {
    let t = new Test()
    t.test = "test"
    return this.formBuilder.formGroup(t);
  }
class Test {
  @prop()
  test: string;
}

results in 'class constructors must be invoked with |new|' What am I missing?

Ajay Ojha
@ajayojha
@NilsWild all looks good
Nils Wild
@NilsWild
@ajayojha hm.. i have a stacktrace like this:
RxFormControl@http://localhost:4400/vendors~main.c683779b10029adcdccc.bundle.js:117234:21\n./node_modules/@rxweb/reactive-form-validators/fesm5/rxweb-reactive-form-validators.js/RxFormBuilder.prototype.formGroup/<@http://localhost:4400/vendors~main.c683779b10029adcdccc.bundle.js:120328:62\n./node_modules/@rxweb/reactive-form-validators/fesm5/rxweb-reactive-form-validators.js/RxFormBuilder.prototype.formGroup@http://localhost:4400/vendors~main.c683779b10029adcdccc.bundle.js:120299:9\ncreateFormGroupWithBuilder@http://localhost:4400/main.c683779b10029adcdccc.bundle.js:399:16
Ajay Ojha
@ajayojha
which angular and reactive-form-validators version you are using?
Nils Wild
@NilsWild
angular 10.2.7 rxweb 2.1.2
sorry angular 10.1.0
Ajay Ojha
@ajayojha
ok
Ajay Ojha
@ajayojha
@NilsWild is it possible to share the package.json?
Nils Wild
@NilsWild
I think it's related to rxweb <-> storybook. If I open it up in the app I do not have that error
{
  "name": "cleared",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "nx": "nx",
    "start": "nx serve",
    "build": "nx build",
    "test": "nx test",
    "lint": "nx workspace-lint && nx lint",
    "e2e": "nx e2e",
    "affected:apps": "nx affected:apps",
    "affected:libs": "nx affected:libs",
    "affected:build": "nx affected:build",
    "affected:e2e": "nx affected:e2e",
    "affected:test": "nx affected:test",
    "affected:lint": "nx affected:lint",
    "affected:dep-graph": "nx affected:dep-graph",
    "affected": "nx affected",
    "format": "nx format:write",
    "format:write": "nx format:write",
    "format:check": "nx format:check",
    "update": "nx migrate latest",
    "workspace-schematic": "nx workspace-schematic",
    "dep-graph": "nx dep-graph",
    "help": "nx help",
    "postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points",
    "publish-pacts": "node publish-pacts.js"
  },
  "private": true,
  "dependencies": {
    "@angular-material-components/datetime-picker": "^4.0.5",
    "@angular/animations": "^10.2.3",
    "@angular/cdk": "^10.2.7",
    "@angular/common": "^10.1.0",
    "@angular/compiler": "^10.1.0",
    "@angular/core": "^10.1.0",
    "@angular/forms": "^10.1.0",
    "@angular/material": "^10.2.7",
    "@angular/platform-browser": "^10.1.0",
    "@angular/platform-browser-dynamic": "^10.1.0",
    "@angular/router": "^10.1.0",
    "@ngrx/component-store": "^10.0.1",
    "@rxweb/reactive-form-validators": "^2.1.2",
    "antlr4ts": "^0.5.0-alpha.3",
    "rxjs": "~6.5.5",
    "zone.js": "^0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.1001.3",
    "@angular/compiler-cli": "^10.1.0",
    "@angular/language-service": "^10.1.0",
    "@nrwl/angular": "^10.3.3",
    "@nrwl/cli": "10.3.3",
    "@nrwl/cypress": "10.3.3",
    "@nrwl/eslint-plugin-nx": "10.3.3",
    "@nrwl/jest": "10.3.3",
    "@nrwl/storybook": "^10.3.3",
    "@nrwl/workspace": "10.3.3",
    "@pact-foundation/pact": "9.13.0",
    "@storybook/addon-actions": "^6.0.28",
    "@storybook/addon-controls": "^6.0.28",
    "@storybook/angular": "^6.0.28",
    "@types/jest": "26.0.8",
    "@types/node": "~8.9.4",
    "@types/webpack": "4.41.21",
    "@typescript-eslint/eslint-plugin": "4.3.0",
    "@typescript-eslint/parser": "4.3.0",
    "antlr4ts-cli": "^0.5.0-alpha.3",
    "codelyzer": "~5.0.1",
    "cypress": "^4.1.0",
    "dotenv": "6.2.0",
    "eslint": "7.10.0",
    "eslint-config-prettier": "6.0.0",
    "jest": "26.2.2",
    "jest-preset-angular": "8.3.1",
    "prettier": "2.0.4",
    "ts-jest": "26.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~6.0.0",
    "typescript": "~4.0.3"
  }
}
Ajay Ojha
@ajayojha
Ok
Nils Wild
@NilsWild
@ajayojha after some more digging i found the problem: storybookjs/storybook#11379 storybookjs/storybook#11433
its an issue with storybook and Angular 10 ES 2015 bundles. Sorry that i didn't check the component in the real app first.
Nils Wild
@NilsWild
When using autoPushFormGroup https://docs.rxweb.io/how-to/autoPushFormGroup/decorators is there a clean way to reset the model?
rachanachag
@rachanachag
Hi @ajayojha, I want to use a conditional expression in Form group validation where I can set dynamic value for max length validation
e.g @maxLength({
conditionalExpression: x => x.validationMaxLength == "True",
value: x => x.validationMaxLengthNum
})

conditional expression is working fine in this case but I am not able to set value with ' x => x.validationMaxLengthNum'
Can you please help me this? Is there any other way ?
Xambey
@Xambey

hello, can you please tell me how you can make decorators work (for validation) if the component implements its ControlValueAccessor?

https://pastebin.com/hVbkVvdA

Inside the template, this component has a bootstrap datapicker, which changes its value depending on the value property. As far as I know, this datapicker inside also implements its own implementation of ControlValueAccessor, it looks like it stops being called when the formControlName is set for the parent component

UPD: I didn't notice that the controller doesn't seem to change its state to touched, after focusing, it looks like my mistake

Ushmidave
@Ushmidave
@rachanachag For on the fly validation based upon the dynamic value, you must pass the validation rules in dynamicConfig, please refer this example : https://stackblitz.com/angular/lroljoyaoba?file=src/app/bind-complete.component.ts
rachanachag
@rachanachag
@Ushmidave, I am using model-driven form and I want to set value for max length validation based upon value we get from database.
I have tried using the below code
@maxLength({
conditionalExpression: x => x.validationMaxLengthNumber > 0 ,
dynamicConfig: (x, y) => {
const maxlengthValue= x => x.validationMaxLengthNumber;
return {
value: maxlengthValue,
message: invalid
};
}
})
mitanshu-patel
@mitanshu-patel
Hello @ajayojha , can you please provide help regarding this ticket: rxweb/rxweb#444
Kiran-Pawar
@Kiran-Pawar
Hello @ajayojha , can you please have look into this ticket: rxweb/rxweb#451
Kiran-Pawar
@Kiran-Pawar
Hello @ajayojha, whenever I am running any architecture command from package manager console,getting this error "Newtonsoft.Json.JsonSerializationException: Unexpected end when deserializing object. Path 'CompanyCustomerMappings' " but not able to trace the issue
Ajay Ojha
@ajayojha
@Kiran-Pawar check the json files, there might me invalid json in the files
Kiran-Pawar
@Kiran-Pawar
ok let me check for it
Kiran-Pawar
@Kiran-Pawar
It is working fine now, thank you
stylishvinod
@stylishvinod
Hi Team, i am referring this link for disable formcontrol https://stackblitz.com/angular/bedxedgakrx?file=src%2Fapp%2Fdisable-add.component.ts, but in my case i have to use this param in formBuilder, so I am trying conditional disable like below, but it is not working. Can you please suggest. form = this.RxFormBuilder.group({ fielName: ['', RxwebValidators.disable({conditionalExpression: (x) => myCondition}]}).
stylishvinod
@stylishvinod
Hi Team, I am using @rxweb/reactive-form-validators package for conditional required validations and it is working fine for simple forms, when i started converting the form to nested form and have built nested forms with Angular reactive forms with CVAs(Controlled value accessors), Then conditional validations are not working. Please suggest am i missing some setup or any other things.
afzalmansuri
@afzalmansuri
Hello @ajayojha Sir, can you please look into this ticket: rxweb/rxweb#454
Ajay Ojha
@ajayojha
@afzalmansuri will be released today