Hello Sridhar, With this format, it's not throwing any error, but the output was strange. Do you have any idea? {{dateExample | date : 'd/m/y'}} the output is 11/23/2021
Hi sir I have a small dbt I want to retrieve my json data and print in table format based on.a condition That if male && unmarried prefix = mr Female && umarried prefix= ms Where mr and mrs/ms should not be in json file. They should be shown using the if condition
Hi Jhansi. That should be simple and straightforward. U can simply use ngIf condition inside a ngFor and print accordingly. Give it a try else i will cover it in coming tutorial 👍
Error: Module parse failed: Invalid number (97:33) File was processed with these loaders: * ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js * ./node_modules/@ngtools/webpack/src/ivy/index.js You may need an additional loader to handle the result of these loaders. | this.dateExample = Date.now(); | this.currencyExample = 12; > this.percentageExample = 086.27; | } | returnClassName() { I am getting this errors
Hello Sir ,When I am working with date. I got this error. Please check it once. src/app/app.component.html:40:9 - error TS2769: No overload matches this call. Overload 1 of 3, '(value: string | number | Date, format?: string | undefined, timezone?: string | undefined, locale?: string | undefined): string | null', gave the following error. Argument of type '() => number' is not assignable to parameter of type 'string | number | Date'. Overload 2 of 3, '(value: null | undefined, format?: string | undefined, timezone?: string | undefined, locale?: string | undefined): null', gave the following error. Argument of type '() => number' is not assignable to parameter of type 'null | undefined'. Overload 3 of 3, '(value: string | number | Date | null | undefined, format?: string | undefined, timezone?: string | undefined, locale?: string | undefined): string | null', gave the following error. Argument of type '() => number' is not assignable to parameter of type 'string | number | Date | null | undefined'. 40 {{ dateExample | date: "short" }} ~~~~~~~~~~~ src/app/app.component.ts:5:16 5 templateUrl: './app.component.html', ~~~~~~~~~~~~~~~~~~~~~~ Error occurs in the template of component AppComponent.
Thanks for the Video. Great Work!!
Thanks a lot brother for these videos.its really helpful.
You are most welcome
Great explanation
Glad it was helpful!
As you told in tutorial video you will be going to create live website i am looking for that videos
Yes, soon. Pls also check out many Angular projects and playlists on my channel
👍
We can directly call date fun to display date , why we use pipe
Hi Asha. Its just an example of how to use parametrized pipes
Hello Sridhar,
With this format, it's not throwing any error, but the output was strange. Do you have any idea?
{{dateExample | date : 'd/m/y'}}
the output is 11/23/2021
Hi sir
I have a small dbt
I want to retrieve my json data and print in table format based on.a condition
That if male && unmarried prefix = mr
Female && umarried prefix= ms
Where mr and mrs/ms should not be in json file. They should be shown using the if condition
Hi Jhansi. That should be simple and straightforward. U can simply use ngIf condition inside a ngFor and print accordingly. Give it a try else i will cover it in coming tutorial 👍
I tried sir but not worked also I'm trying to use patchvalues dynamically. Confused in useing it
I have this planned and coming in next 5 days. Is it very urgent or can it wait till next 5 days?
Sir if possible could you make a video on this tomorrow
Sure Jhansi. Btw, did u check ngFor video i created??
Error: Module parse failed: Invalid number (97:33)
File was processed with these loaders:
* ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js
* ./node_modules/@ngtools/webpack/src/ivy/index.js
You may need an additional loader to handle the result of these loaders.
| this.dateExample = Date.now();
| this.currencyExample = 12;
> this.percentageExample = 086.27;
| }
| returnClassName() {
I am getting this errors
Hello Sir ,When I am working with date. I got this error. Please check it once.
src/app/app.component.html:40:9 - error TS2769: No overload matches this call.
Overload 1 of 3, '(value: string | number | Date, format?: string | undefined, timezone?: string | undefined, locale?: string | undefined): string | null', gave the following error.
Argument of type '() => number' is not assignable to parameter of type 'string | number | Date'.
Overload 2 of 3, '(value: null | undefined, format?: string | undefined, timezone?: string | undefined, locale?: string | undefined): null', gave the following error.
Argument of type '() => number' is not assignable to parameter of type 'null | undefined'.
Overload 3 of 3, '(value: string | number | Date | null | undefined, format?: string | undefined, timezone?: string | undefined, locale?: string | undefined): string | null', gave the following error.
Argument of type '() => number' is not assignable to parameter of type 'string | number | Date | null | undefined'.
40 {{ dateExample | date: "short" }}
~~~~~~~~~~~
src/app/app.component.ts:5:16
5 templateUrl: './app.component.html',
~~~~~~~~~~~~~~~~~~~~~~
Error occurs in the template of component AppComponent.