Re: [AngularJS] Button hide n show

2019-02-16 Thread Partha Majumdar
https://parthamajumdar.org/2018/10/01/simple-button-trick-angular-js/

Partha Majumdar
http://www.partha.majumdar.org



On Sat, Feb 16, 2019 at 9:10 PM Roshani Ghanwat <
roshani.ghanwat1...@gmail.com> wrote:

> Hi I am new fresher in angularjs.i m stuck on button hide n show. Actually
> I hv 2 html pages.in that 1st page hv 2 button in this 2 button is
> connected with 2 html page and in that 2 nd page button doesn't show when
> it is call from 1st html page. But when 2 nd page self  call all button
> need to show
>
> --
> 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 angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: Mat-Stepper

2018-11-01 Thread Partha Majumdar
Thanks a lot, Mr. Sander.

The problem I had with Linear treatment of Stepper has now been solved.

I however have one problem left with Mat-Stepper. In the form, "Tax Pack
Detail Add", the Mat-Stepper resets if the transaction is executed
successfully. The Mat-Stepper never visits the last step.
If the transaction fails, the last step is displayed as expected.

Please provide me a hint as to what I should check. I will do the needful.

Very much appreciated.

Regards,
Partha Majumdar
http://www.parthamajumdar.org



On Thu, Nov 1, 2018 at 10:28 AM Sander Elias  wrote:

> Hi Partha,
>
> I couldn't get your app up and running without spending too much time on
> it.
> Created you a sample instead
> <https://stackblitz.com/edit/material-stepper-without-form-but-validating?file=app%2Fstepper-overview-example.ts>
> .
>
> BTW, in your app you are loading quite some angular1 resources that
> shouldn't be there, and take another look at the 3rth parties you load. I
> don't think you use that much of it. load only what you use, and not
> everything. that will bring down your payload to an acceptable level.
>
> Regards
> Sander
>
> --
> 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 angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] WARNING in budgets, maximum exceeded for initial. Budget 2.1 MB was exceeded by 1.47 MB.

2018-10-31 Thread Partha Majumdar
Thanks Mr. Lucas.
Partha Majumdar
http://www.parthamajumdar.org



On Tue, Oct 30, 2018 at 6:15 PM 'Lucas Lacroix' via Angular and AngularJS
discussion  wrote:

> It's a warning, not an error. You can either ignore it, or set a new
> budget.
> This article goes over the details:
> https://medium.com/dailyjs/how-did-angular-cli-budgets-save-my-day-and-how-they-can-save-yours-300d534aae7a
>
> On Tue, Oct 30, 2018 at 8:42 AM Partha Majumdar 
> wrote:
>
>> Dear Sir/Madam,
>>
>> I developed an application using Angular 6. It was working and I could
>> make a production build and install on AWS.
>>
>> I upgraded to Angular 7 and then the application was destroyed, With lots
>> of effort, I got the application up again in 4 days. I could run the
>> application locally on my machine. When I tried to make the production
>> build, it gave error. I am trying to get a solution for that.
>>
>> Then, I made a new blank application in Angular 7. Then I could create a
>> production build of this empty app.
>> I have started to add the components of my existing app to this blank app
>> and building after each add. This is working so far. I can build a
>> production build.
>>
>> After adding about 5 sets of components, I am now getting the below
>> WARNING when I create the production build.
>>
>> Please help me resolve this.
>>
>> Thanks and Regards,
>> Partha
>>
>> 192:pConfMan-v11 parthamajumdar$ ng build --prod --aot
>>
>>
>> Date: 2018-10-30T12:33:36.244Z
>> Hash: 0076630d9dc301c0fa6a
>> Time: 94228ms
>> chunk {0} runtime.ec2944dd8b20ec099bf3.js (runtime) 1.44 kB [entry] [
>> rendered]
>> chunk {1} main.7018f657f38dc92bdec9.js (main) 3.05 MB [initial] [rendered
>> ]
>> chunk {2} polyfills.c6871e56cb80756a5498.js (polyfills) 38.4 kB [initial]
>> [rendered]
>> chunk {3} styles.2afea9ce6221e4313242.css (styles) 483 kB [initial] [
>> rendered]
>>
>>
>> WARNING in budgets, maximum exceeded for initial. Budget 2.1 MB was
>> exceeded by 1.47 MB.
>>
>> --
>> 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 angular+unsubscr...@googlegroups.com.
>> To post to this group, send email to angular@googlegroups.com.
>> Visit this group at https://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Lucas Lacroix
> Computer Scientist
> Advanced Technology Division, MEDITECH <http://ehr.meditech.com/>
> 781-774-2293
>
> <https://ehr.meditech.com/expanse>
> <https://www.linkedin.com/company/meditech>
> <https://twitter.com/MEDITECH>   <https://www.facebook.com/MeditechEHR>
> Subscribe
> <https://info.meditech.com/get-great-meditech-content?hsCtaTracking=864299ec-5abf-4004-9c6d-2d051794101f%7Cc911be42-538a-4a48-8dca-a6d4001c6326>
>  to
> receive emails from MEDITECH or to change email preferences.
>
> --
> 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 angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Unable to create Production Build

2018-10-30 Thread Partha Majumdar
Dear Mr. Sander,

I have solved this problem.

The angular.json file was corrupted. Instead of 



"fileReplacements": [
{ 
  "replace": "src/environments/environment.ts", 
  "with": "src/environments/environment.prod.ts" 
} 
  ],



I had the following:


"fileReplacements": [
   { 
  "replace": "src/undefined", 
  "with": "src/environments/environment.ts" 
} 
  ]



Request if you could kindly help me with the Mat-Stepper issue. I will 
share my code privately with you.

Thanks in advance.

Regards,
Partha

On Tuesday, 30 October 2018 19:15:23 UTC+5:30, Partha Majumdar wrote:
>
> Thanks Mr. Sander.
>
> I have created a new blank application. I tested that I could build a 
> production build on this. Then I copy component by component from my 
> existing application into this blank application. After copying each 
> component, I built the application and checked. Now, the while application 
> had been build successfully in development and production.
>
> I have the old code available with me. Please let me know when you would 
> like to inspect it. I will send you the new link to download the 
> application.
>
> Request let me know how to send a private message.
>
> I am very grateful for your kind attention and promised help.
>
> Thanks and Regards,
> Partha
>
>
> On Tuesday, 30 October 2018 15:40:31 UTC+5:30, Sander Elias wrote:
>>
>> Hi Partha,
>>
>> I'm currently out of office. I will check your code tomorrow morning. 
>> (CEST)
>>
>> You should delete the message with the link, as this will be available to 
>> the entire internet! (I saved it away. If you take down the link, pls send 
>> me a private message with a new one!)
>>
>> Regards
>> Sander
>>
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Unable to create Production Build

2018-10-30 Thread Partha Majumdar
Thanks Mr. Sander.

I have created a new blank application. I tested that I could build a 
production build on this. Then I copy component by component from my 
existing application into this blank application. After copying each 
component, I built the application and checked. Now, the while application 
had been build successfully in development and production.

I have the old code available with me. Please let me know when you would 
like to inspect it. I will send you the new link to download the 
application.

Request let me know how to send a private message.

I am very grateful for your kind attention and promised help.

Thanks and Regards,
Partha


On Tuesday, 30 October 2018 15:40:31 UTC+5:30, Sander Elias wrote:
>
> Hi Partha,
>
> I'm currently out of office. I will check your code tomorrow morning. 
> (CEST)
>
> You should delete the message with the link, as this will be available to 
> the entire internet! (I saved it away. If you take down the link, pls send 
> me a private message with a new one!)
>
> Regards
> Sander
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] WARNING in budgets, maximum exceeded for initial. Budget 2.1 MB was exceeded by 1.47 MB.

2018-10-30 Thread Partha Majumdar
Dear Sir/Madam,

I developed an application using Angular 6. It was working and I could make 
a production build and install on AWS.

I upgraded to Angular 7 and then the application was destroyed, With lots 
of effort, I got the application up again in 4 days. I could run the 
application locally on my machine. When I tried to make the production 
build, it gave error. I am trying to get a solution for that.

Then, I made a new blank application in Angular 7. Then I could create a 
production build of this empty app. 
I have started to add the components of my existing app to this blank app 
and building after each add. This is working so far. I can build a 
production build.

After adding about 5 sets of components, I am now getting the below WARNING 
when I create the production build.

Please help me resolve this.

Thanks and Regards,
Partha

192:pConfMan-v11 parthamajumdar$ ng build --prod --aot


Date: 2018-10-30T12:33:36.244Z
Hash: 0076630d9dc301c0fa6a
Time: 94228ms
chunk {0} runtime.ec2944dd8b20ec099bf3.js (runtime) 1.44 kB [entry] [
rendered]
chunk {1} main.7018f657f38dc92bdec9.js (main) 3.05 MB [initial] [rendered]
chunk {2} polyfills.c6871e56cb80756a5498.js (polyfills) 38.4 kB [initial] [
rendered]
chunk {3} styles.2afea9ce6221e4313242.css (styles) 483 kB [initial] [
rendered]


WARNING in budgets, maximum exceeded for initial. Budget 2.1 MB was 
exceeded by 1.47 MB.

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: Error in Mat-Stepper implementation

2018-10-30 Thread Partha Majumdar
Dear Mr. Sander,

I have shared my entire application with you. Could you please help me with
this issue. The Menu option is Menu -> Tax Pack

Partha Majumdar
http://www.parthamajumdar.org <http://www.partha.majumdar.org>



On Sat, Oct 20, 2018 at 7:24 AM Partha Majumdar 
wrote:

> Ok. I will try as I have never used it before.
> Partha Majumdar
> http://www.partha.majumdar.org
>
>
>
> On Fri, Oct 19, 2018 at 11:37 PM Sander Elias 
> wrote:
>
>> Hi Partha,
>>
>> Can you reproduce your issue on a stackblitz
>> <https://stackblitz.com/fork/angular>?
>>
>> Regards
>> Sander
>>
>> --
>> 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 angular+unsubscr...@googlegroups.com.
>> To post to this group, send email to angular@googlegroups.com.
>> Visit this group at https://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Unable to create Production Build

2018-10-30 Thread Partha Majumdar
Dear Mr. Sander,

The application can be downloaded from the below link.

https://drive.google.com/open?id=1AasmFEuWzrVs8W0dukU5reU0OcP6Zvvy

Thanks for your help in advance.

Regards,
Partha

On Tuesday, 30 October 2018 13:12:29 UTC+5:30, Partha Majumdar wrote:
>
> Dear Mr. Sander,
>
> The same application was built in production mode using Angular 6.
>
> Regards,
> Partha
>
> On Tuesday, 30 October 2018 13:10:58 UTC+5:30, Partha Majumdar wrote:
>>
>> Dear Mr. Sander,
>>
>> Thanks for your kind attention.
>>
>> I can send the complete application so that you can reproduce in your 
>> machine. Is it okay to send you that.
>>
>> Regards,
>> Partha
>>
>> On Tuesday, 30 October 2018 11:31:40 UTC+5:30, Sander Elias wrote:
>>>
>>> Hi Partha,
>>>
>>> I'm sorry you had such a hard time upgrading to angular 7. This is very 
>>> uncommon, and there are no breaking changes as far as we know.
>>> But I can't help you with such an error if I can't reproduce it in a 
>>> controlled environment. (AKA my own computer ;) )
>>> It looks like you are violating one of the AOT "rules", and try to 
>>> dynamically set/load some of the resources. This will not work in AOT (in 
>>> any version v4 an up)
>>>
>>> Regards
>>> Sander
>>>
>>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Unable to create Production Build

2018-10-30 Thread Partha Majumdar
Dear Mr. Sander,

The same application was built in production mode using Angular 6.

Regards,
Partha

On Tuesday, 30 October 2018 13:10:58 UTC+5:30, Partha Majumdar wrote:
>
> Dear Mr. Sander,
>
> Thanks for your kind attention.
>
> I can send the complete application so that you can reproduce in your 
> machine. Is it okay to send you that.
>
> Regards,
> Partha
>
> On Tuesday, 30 October 2018 11:31:40 UTC+5:30, Sander Elias wrote:
>>
>> Hi Partha,
>>
>> I'm sorry you had such a hard time upgrading to angular 7. This is very 
>> uncommon, and there are no breaking changes as far as we know.
>> But I can't help you with such an error if I can't reproduce it in a 
>> controlled environment. (AKA my own computer ;) )
>> It looks like you are violating one of the AOT "rules", and try to 
>> dynamically set/load some of the resources. This will not work in AOT (in 
>> any version v4 an up)
>>
>> Regards
>> Sander
>>
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Unable to create Production Build

2018-10-30 Thread Partha Majumdar
Dear Mr. Sander,

Thanks for your kind attention.

I can send the complete application so that you can reproduce in your 
machine. Is it okay to send you that.

Regards,
Partha

On Tuesday, 30 October 2018 11:31:40 UTC+5:30, Sander Elias wrote:
>
> Hi Partha,
>
> I'm sorry you had such a hard time upgrading to angular 7. This is very 
> uncommon, and there are no breaking changes as far as we know.
> But I can't help you with such an error if I can't reproduce it in a 
> controlled environment. (AKA my own computer ;) )
> It looks like you are violating one of the AOT "rules", and try to 
> dynamically set/load some of the resources. This will not work in AOT (in 
> any version v4 an up)
>
> Regards
> Sander
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Unable to create Production Build

2018-10-29 Thread Partha Majumdar
Dear Sir/Madam,

I need to create the Production Build and not the Development Build.

Please help.

Thanks and Regards,
Partha

On Tuesday, 30 October 2018 09:54:16 UTC+5:30, Partha Majumdar wrote:
>
> Dear Sir/Madam,
>
> I had a perfectly running Application developed suing Angular 6.
>
> I upgraded to Angular 7. The whole application was destroyed. It took 4 
> days to restore the application. Now, I can build the application in 
> development mode and it works.
>
> I am trying to make the production build. However, I get the following 
> error.
>
> Please help so that I can create the development build.
>
> Regards,
> Partha
>
> Command: ng build --prod --aot
>
> Output:
> The /Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/src/
> undefined path in file replacements does not exist.
> Error: The /Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/
> src/undefined pathin file replacements does not exist.
> at TapSubscriber.operators_1.tap [as _tapNext] (/Users/parthamajumdar/
> Documents/Solutions/Paikari/pConfMan-v1/node_modules/@angular-devkit/build
> -angular/src/utils/normalize-file-replacements.js:26:19)
> at TapSubscriber._next (/Users/parthamajumdar/Documents/Solutions/
> Paikari/pConfMan-v1/node_modules/rxjs/internal/operators/tap.js:59:27)
> at TapSubscriber.Subscriber.next (/Users/parthamajumdar/Documents/
> Solutions/Paikari/pConfMan-v1/node_modules/rxjs/internal/Subscriber.js:67:
> 18)
> at SafeSubscriber.__tryOrUnsub (/Users/parthamajumdar/Documents/
> Solutions/Paikari/pConfMan-v1/node_modules/@angular-devkit/core/
> node_modules/rxjs/internal/Subscriber.js:209:16)
> at SafeSubscriber.next (/Users/parthamajumdar/Documents/Solutions/
> Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/
> internal/Subscriber.js:147:22)
> at Subscriber._next (/Users/parthamajumdar/Documents/Solutions/Paikari
> /pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/internal/
> Subscriber.js:90:26)
> at Subscriber.next (/Users/parthamajumdar/Documents/Solutions/Paikari/
> pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/internal/
> Subscriber.js:67:18)
> at Observable.rxjs_1.Observable.obs [as _subscribe] (/Users/
> parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/
> @angular-devkit/core/node/host.js:241:21)
> at Observable._trySubscribe (/Users/parthamajumdar/Documents/Solutions
> /Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/
> internal/Observable.js:44:25)
> at Observable.subscribe (/Users/parthamajumdar/Documents/Solutions/
> Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/
> internal/Observable.js:30:22)
> at DoOperator.call (/Users/parthamajumdar/Documents/Solutions/Paikari/
> pConfMan-v1/node_modules/rxjs/internal/operators/tap.js:32:23)
> at Observable.subscribe (/Users/parthamajumdar/Documents/Solutions/
> Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/
> internal/Observable.js:25:22)
> at /Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/
> node_modules/rxjs/internal/util/subscribeToObservable.js:10:20
> at Object.subscribeToResult (/Users/parthamajumdar/Documents/Solutions
> /Paikari/pConfMan-v1/node_modules/rxjs/internal/util/subscribeToResult.js:
> 10:45)
> at MergeMapSubscriber._innerSub (/Users/parthamajumdar/Documents/
> Solutions/Paikari/pConfMan-v1/node_modules/rxjs/internal/operators/
> mergeMap.js:82:29)
> at MergeMapSubscriber._tryNext (/Users/parthamajumdar/Documents/
> Solutions/Paikari/pConfMan-v1/node_modules/rxjs/internal/operators/
> mergeMap.js:76:14)
>
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Unable to create Production Build

2018-10-29 Thread Partha Majumdar
Dear Sir/Madam,

I had a perfectly running Application developed suing Angular 6.

I upgraded to Angular 7. The whole application was destroyed. It took 4 
days to restore the application. Now, I can build the application in 
development mode and it works.

I am trying to make the production build. However, I get the following 
error.

Please help so that I can create the development build.

Regards,
Partha

Command: ng build --prod --aot

Output:
The /Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/src/
undefined path in file replacements does not exist.
Error: The /Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/src
/undefined pathin file replacements does not exist.
at TapSubscriber.operators_1.tap [as _tapNext] (/Users/parthamajumdar/
Documents/Solutions/Paikari/pConfMan-v1/node_modules/@angular-devkit/build-
angular/src/utils/normalize-file-replacements.js:26:19)
at TapSubscriber._next (/Users/parthamajumdar/Documents/Solutions/
Paikari/pConfMan-v1/node_modules/rxjs/internal/operators/tap.js:59:27)
at TapSubscriber.Subscriber.next (/Users/parthamajumdar/Documents/
Solutions/Paikari/pConfMan-v1/node_modules/rxjs/internal/Subscriber.js:67:18
)
at SafeSubscriber.__tryOrUnsub (/Users/parthamajumdar/Documents/
Solutions/Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules
/rxjs/internal/Subscriber.js:209:16)
at SafeSubscriber.next (/Users/parthamajumdar/Documents/Solutions/
Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/
internal/Subscriber.js:147:22)
at Subscriber._next (/Users/parthamajumdar/Documents/Solutions/Paikari/
pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/internal/
Subscriber.js:90:26)
at Subscriber.next (/Users/parthamajumdar/Documents/Solutions/Paikari/
pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/internal/
Subscriber.js:67:18)
at Observable.rxjs_1.Observable.obs [as _subscribe] (/Users/
parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/@angular
-devkit/core/node/host.js:241:21)
at Observable._trySubscribe (/Users/parthamajumdar/Documents/Solutions/
Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/
internal/Observable.js:44:25)
at Observable.subscribe (/Users/parthamajumdar/Documents/Solutions/
Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/
internal/Observable.js:30:22)
at DoOperator.call (/Users/parthamajumdar/Documents/Solutions/Paikari/
pConfMan-v1/node_modules/rxjs/internal/operators/tap.js:32:23)
at Observable.subscribe (/Users/parthamajumdar/Documents/Solutions/
Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/
internal/Observable.js:25:22)
at /Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/
node_modules/rxjs/internal/util/subscribeToObservable.js:10:20
at Object.subscribeToResult (/Users/parthamajumdar/Documents/Solutions/
Paikari/pConfMan-v1/node_modules/rxjs/internal/util/subscribeToResult.js:10:
45)
at MergeMapSubscriber._innerSub (/Users/parthamajumdar/Documents/
Solutions/Paikari/pConfMan-v1/node_modules/rxjs/internal/operators/mergeMap.
js:82:29)
at MergeMapSubscriber._tryNext (/Users/parthamajumdar/Documents/
Solutions/Paikari/pConfMan-v1/node_modules/rxjs/internal/operators/mergeMap.
js:76:14)

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: Mat-Stepper

2018-10-29 Thread Partha Majumdar
Thanks Mr Sander. Request if you could provide an example for checking
validity. This will help me lots

On Mon, 29 Oct 2018 at 12:12 PM, Sander Elias  wrote:

> Hi Partha,
>
> I just checked
> <https://stackblitz.com/edit/material-stepper-without-form?file=app/stepper-overview-example.html>.
> Forms are not mandatory.
> However, if you want to control the validity of each step, you need a way
> to feed this into the stepper. Forms are a way to do that.
>
> Regards
> Sander
>
> --
> 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 angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Partha Majumdar
http://www.partha.majumdar.org

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Mat-Stepper

2018-10-28 Thread Partha Majumdar
Dear Sir/Madam,

For a Mat-Stepper to work in Linear mode is it necessary to have forms in 
each step?

Regards,
Partha

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Mat Icons not appearing

2018-10-26 Thread Partha Majumdar
Dear Sir/Madam,

I upgraded from Angular 6 to Angular 7. After a lot of struggle, I managed 
to compile my application.

Now, the application seems to be running. I am still testing.

However, the Mat-icons are no longer appearing where I have used the,. 
Please see the screen shot.

Please help.

Regards,
Partha

[image: Screenshot 2018-10-27 at 6.25.36 AM.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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Why does Mat-Paginator not work?

2018-10-23 Thread Partha Majumdar
Dear Sir/Madam,

I have a form with a Mat-Table. I have attached a Mat-Paginator to the 
Mat-Table. However, the MAt-Paginator does not work. Please help.

Regards,
Partha

*The HTML Code is as follows:*





 As Of Date
 {{elem.asOfDate | 
date:'dd-MMM-'}} 



 Exchange Rate 
 {{elem.exchangeRate | 
number:'1.4-4'}} 









*The Paginator declaration in .TS file is as follows:*

@ViewChild('exchangeRateList', {read: MatPaginator}) 
exchangeRateListPaginator: MatPaginator;

*The relevant code in the .TS file is as follows:*

ngOnInit() {
this.isLoading = true;

this.dataForm = new FormGroup({
'currencyCode': new FormControl(null, {validators: [Validators.required, 
Validators.maxLength(4)]}),
'asOfDate': new FormControl(null, {validators: [Validators.required, 
Validators.maxLength(20)]}),
'exchangeRate': new FormControl(null, {validators: [Validators.required, 
Validators.maxLength(10)]}),
'lastUpdateDate': new FormControl(null, {validators: [Validators.required, 
Validators.maxLength(20)]}),
'updateUser': new FormControl(null, {validators: [Validators.maxLength(20
)]})
});

this.route.paramMap
.subscribe(
(paramMap) => {
if (paramMap.has('currencyCode')) {
this.currencyCode = paramMap.get('currencyCode');
this.httpClient
.get<{message: string, values: CurrencyWithExchangeRate[], recordGoodCount: 
number}>(
this.dataService.baseURL + '/' + this.dataService.serviceRoute + '/getOne' 
+ '/' + this.currencyCode)
.subscribe(
(returnValue) => {
this.exchangeRateList = returnValue.values[0].exchangeRates;
this.listData.data = this.exchangeRateList;
this.listData.paginator = this.exchangeRateListPaginator;
if (this.exchangeRateList.length > 0) {
for (let i = 0; i < this.exchangeRateList.length; i++) {
this.exchangeRateArray[i] = 0;
}
for (let i = 0; i < this.exchangeRateList.length; i++) {
this.exchangeRateArray[this.exchangeRateList.length - i - 1] = this.
exchangeRateList[i].exchangeRate;
}
}

if (paramMap.has('asOfDate')) {
this.mode = this.EDIT_MODE_INDICATOR;
this.asOfDate = new Date(paramMap.get('asOfDate'));
alert(this.asOfDate);
this.dataService.getOneData(this.currencyCode, this.asOfDate)
.subscribe(
(fetchedData) => {
this.dataToEdit = fetchedData.data;
this.dataForm.setValue({
'currencyCode': this.currencyCode,
'asOfDate': this.dataToEdit.asOfDate,
'exchangeRate': this.dataToEdit.exchangeRate,
'lastUpdateDate': this.dataToEdit.lastUpdateDate,
'updateUser': this.dataService.loggedInUser
});
this.isLoading = false;
},
(error) => {
// alert('Code: ' + this.dataCode + ' not found in System. Redirecting to 
List');
this.router.navigate([this.dataService.frontEndRouteToNavigate]);
}
);
} else {
this.mode = this.CREATE_MODE_INDICATOR;
this.dataCode = null;
this.dataToEdit = dummyData;
this.dataForm.setValue({
'currencyCode': this.currencyCode,
'asOfDate': new Date(Date.now()),
'exchangeRate': dummyData.exchangeRate,
'lastUpdateDate': dummyData.lastUpdateDate,
'updateUser': this.dataService.loggedInUser
});
this.selectedValue = '';
this.isLoading = false;
}
}
);
}
}
);

this.listData.data = this.exchangeRateList;
this.listData.paginator = this.exchangeRateListPaginator;

this.isUserAuthenticated = this.generalService.getIsUserAuthenticated();
this.authStatusSubscription = this.generalService
.getAuthStatusListener()
.subscribe(
(isAuthenticated) => {
this.isLoading = false;
this.isUserAuthenticated = isAuthenticated;
}
);
}









-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: Error in Mat-Stepper implementation

2018-10-19 Thread Partha Majumdar
Ok. I will try as I have never used it before.
Partha Majumdar
http://www.partha.majumdar.org



On Fri, Oct 19, 2018 at 11:37 PM Sander Elias  wrote:

> Hi Partha,
>
> Can you reproduce your issue on a stackblitz
> <https://stackblitz.com/fork/angular>?
>
> Regards
> Sander
>
> --
> 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 angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Error in Mat-Stepper implementation

2018-10-19 Thread Partha Majumdar

Dear Sir/Madam,

I have written a program in Angular 6 which has 4 stage Mat-Stepper. In the 
third stage, I call the Node.JS service to write data to Database. The 
situation is that if the Node Service call fails, then the 4th stage 
MAt-Stepper is displayed properly as expected. However, if the Node service 
writes to the DB properly, the Mat-Stepper resets to returns to the 1st 
stage.

I have been trying to debug for the last 2 days. However, I have made to 
headway in fixing this.

Request you to suggest what could be the issue.

I can share the code if anyone wants to have a look.

Thanks in advance.

Regards,
Partha

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] What is the URL when Header is added

2018-10-15 Thread Partha Majumdar
Thanks for your kind attention, Mr. Lucas.

I solved it. I had to allow 'upload-type' as one of the allowed headers in
Node end.
Partha Majumdar
http://www.partha.majumdar.org



On Tue, Oct 16, 2018 at 7:39 AM 'Lucas Lacroix' via Angular and AngularJS
discussion  wrote:

> Nothing changes in the URL when you add headers. They are completely
> separate.
>
> I suggest you check the logs on your server or the developer tools in your
> browser. Either of those may point to your issue
>
> On Mon, Oct 15, 2018, 22:01 Partha Majumdar  wrote:
>
>> Dear Sir/Madam,
>>
>> I had a working Angular/Node application will I added a Header to the
>> POST method. Now, the Node service is not getting invoked.
>>
>> In my angular code I have the following:
>> const headerDict = {
>> 'upload-type': 'false'
>> };
>>
>> const requestOptions = {
>> headers: new HttpHeaders(headerDict),
>> };
>>
>> this.httpClient.post<{message: string, returnVal: number}>(this.baseURL
>> + '/country', newData, requestOptions)
>>
>> The url in the NODE side is '/api/country' for the POST method.
>>
>> Please let me know what is the change in the URL when a Header is added.
>>
>> Thanks in advance.
>>
>> Regards,
>> Partha
>>
>> --
>> 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 angular+unsubscr...@googlegroups.com.
>> To post to this group, send email to angular@googlegroups.com.
>> Visit this group at https://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Lucas Lacroix
> Computer Scientist
> Advanced Technology Division, MEDITECH <http://ehr.meditech.com/>
> 781-774-2293
>
> <https://ehr.meditech.com/expanse>
> <https://www.linkedin.com/company/meditech>
> <https://twitter.com/MEDITECH>   <https://www.facebook.com/MeditechEHR>
> Subscribe
> <https://info.meditech.com/get-great-meditech-content?hsCtaTracking=864299ec-5abf-4004-9c6d-2d051794101f%7Cc911be42-538a-4a48-8dca-a6d4001c6326>
>  to
> receive emails from MEDITECH or to change email preferences.
>
> --
> 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 angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] What is the URL when Header is added

2018-10-15 Thread Partha Majumdar
Dear Sir/Madam,

I had a working Angular/Node application will I added a Header to the POST 
method. Now, the Node service is not getting invoked.

In my angular code I have the following:
const headerDict = {
'upload-type': 'false'
};

const requestOptions = {
headers: new HttpHeaders(headerDict),
};

this.httpClient.post<{message: string, returnVal: number}>(this.baseURL + 
'/country', newData, requestOptions)

The url in the NODE side is '/api/country' for the POST method.

Please let me know what is the change in the URL when a Header is added.

Thanks in advance.

Regards,
Partha

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Mat-Table inside a MAt-Table shows extra row for every record

2018-10-15 Thread Partha Majumdar
I solved this by adding CSS file

On Monday, 15 October 2018 12:35:44 UTC+5:30, Partha Majumdar wrote:
>
>
> Dear Sir/Madam,
>
> I have implemented a MAt-Table inside a Mat-Table. The data displayed is 
> correct. However, for every row of the parent row, it shows one extra empty 
> row in the Mat-Table. As I am unable to trace the error, I seek help on 
> this forum. Please help.
>
> Regards,
> Partha
>
> The HTML code is as follows.
> 
>  multiTemplateDataRows width="100%">
>
> 
>
> 
> 
>  Tax Code 
>  {{element.taxCode}} 
> 
> 
>
> 
> 
>  Name 
>  
> {{element.taxDescription}} 
> 
>
> 
> 
>  Tax Type Code 
>  
> {{element.taxTypeCode}} 
> 
>
> 
> 
> 
> 
> 
>  *ngIf="isUserAuthenticated">create
> 
> 
>
> 
> 
> 
> 
> 
>  "onDelete(row.taxCode)" *ngIf="isUserAuthenticated">clear mat-icon>
> 
> 
>
> 
> 
>  "displayedColumns.length">
>  [@detailExpand]="element == expandedElement ? 'expanded' : 'collapsed'" 
> *ngIf="element.taxVersion.length > 0">
>  "mat-elevation-z8" width="100%">
> 
>  Tax ID 
>  {{element.taxID}} 
> 
> 
>  Version Code 
>  {{element.versionCode}} 
> 
> 
>  Version Date 
>  {{element.versionDate}} 
> 
> 
>  Tax Rate 
>  {{element.taxRate}} 
> 
> 
> 
> 
> 
> 
> 
>
> 
>  class="example-element-row"
> [class.example-expanded-row]="expandedElement === row"
> (click)="expandedElement = row"
> >
>  "example-detail-row">
> 
>
>  mat-paginator>
> 
>
>
> The display is as follows:
>
> [image: errMatTable.jpeg]
>
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: Is it possible to bypass the Error Interceptor selectively?

2018-10-13 Thread Partha Majumdar
Thanks to both you Sir’s. it was very helpful

On Thu, 11 Oct 2018 at 2:51 PM, Zlatko Đurić  wrote:

> Hi Partha,
>
> In addition to what Sander has said, you can be more specific in your
> error interceptor on the Angular side. Something like this:
>
> intercept(request: HttpRequest, next: HttpHandler): Observable<
> HttpEvent> { return next.handle(request) .catch(response => { if
> (!response instanceof HttpErrorResponse) { // network error, ignore or
> whatevs return throwError(response); } // we got an error from backend.
> Options: // you can check e.g. request method if (response instanceof
> HttpErrorResponse && request.method === 'PUT') { // show or not show the
> dialog .. // alternatively check by your calling URL } else if
> (request.url.contains('bulk-upload-endpoint') { // special handling here }
> Or if it is just one endpoint that needs special handling, catch error
> there on the call site and swallow it. Hope that gives you ideas.
>
>
> --
> 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 angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Partha Majumdar
http://www.partha.majumdar.org

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Error Dialog does not show details

2018-10-10 Thread Partha Majumdar


Dear Sir/Madam,


I have put an additional field in the data containing the details. When the 
dialog display, the details are not shown. When I check the variable 
containing details, it has values in it.


Please suggest what could be wrong.


Regards,

Partha


*error.component.ts*

import { Component, Inject } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material';

@Component({
//  selector: 'app-footer',
  templateUrl: './error.component.html',
  styleUrls: ['./error.component.css']
})
export class ErrorComponent {
  constructor(@Inject(MAT_DIALOG_DATA) public data: {message: string, details: 
string}) {}
}


*error.component.html*


  

  Error

  
  


  {{ data.message 
}}



  
{{ data.details }}
  

  
  

  
Ok!
  

  




*error-interceptor.ts*

import { HttpInterceptor, HttpRequest, HttpHandler, HttpErrorResponse } from 
'@angular/common/http';
import { catchError } from 'rxjs/operators';
import { throwError } from 'rxjs';
import { Injectable } from '@angular/core';
import { MatDialog } from '@angular/material';

import { ErrorComponent } from './error/error.component';

@Injectable()
export class ErrorInterceptor implements HttpInterceptor {
  constructor(private dialog: MatDialog) {}

  intercept(req: HttpRequest, next: HttpHandler) {
return next.handle(req).pipe(
  catchError( (error: HttpErrorResponse) => {
  if (!req.url.endsWith('?upload=1')) {
let errorMessage = 'An unknown Error Occurred!!!';
let errorDetails = '';
if (error.error.message) {
  errorMessage = error.error.message;
  errorDetails = error.error.details;
}
this.dialog.open(ErrorComponent, {data: {message: errorMessage, 
details: errorDetails}});
  }
  return throwError(error);
}
  )
);
  }
}

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Is it possible to bypass the Error Interceptor selectively?

2018-10-10 Thread Partha Majumdar


Dear Sir/Madam,


I have implemented the error interceptor. It works fine.


Now, I have a situation where I call the same node.js service in 2 places 
in my application - while I add a new record and when I upload bulk data.


When I add record, if HTTP error is detected, it should display the 
display. But when I am uploading data, the dialog should not be display. I 
will handle the error separately.

Is it possible?


Regards,

Partha


import { HttpInterceptor, HttpRequest, HttpHandler } from 
'@angular/common/http';
import { Injectable } from '@angular/core';

import { GeneralService } from './general.services';

@Injectable()
export class AuthInterceptor implements HttpInterceptor {
constructor(private generalService: GeneralService) {}

intercept(req: HttpRequest, next: HttpHandler) {
const authToken = this.generalService.getToken();
const authRequest = req.clone({
headers: req.headers.set('Authorisation', 'Bearer ' + authToken)
});
return next.handle(authRequest);
}
}

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Getting Error after implementing AuthGuard

2018-10-10 Thread Partha Majumdar


Dear Sir/Madam,


I implemented the AuthGuard. However, I get the following error when it 
tries to load any Page.


Please help.


Regards,

Partha


The error is as follows:


ERROR Error: Uncaught (in promise): TypeError: Cannot read property 
'canActivate' of undefined

TypeError: Cannot read property 'canActivate' of undefined

at AuthGuard.push../src/app/general/auth-guard.ts.AuthGuard.canActivate 
(auth-guard.ts:17)

at MapSubscriber.project (router.js:2795)

at 
MapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next
 
(map.js:35)

at 
MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next
 
(Subscriber.js:54)

at Observable._subscribe (subscribeToArray.js:5)

at 
Observable.push../node_modules/rxjs/_esm5/internal/Observable.js.Observable._trySubscribe
 
(Observable.js:42)

at 
Observable.push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe
 
(Observable.js:28)

at 
MapOperator.push../node_modules/rxjs/_esm5/internal/operators/map.js.MapOperator.call
 
(map.js:18)

at 
Observable.push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe
 
(Observable.js:23)

at 
MergeMapOperator.push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapOperator.call
 
(mergeMap.js:28)

at AuthGuard.push../src/app/general/auth-guard.ts.AuthGuard.canActivate 
(auth-guard.ts:17)

at MapSubscriber.project (router.js:2795)

at 



*app-routing.module.ts*


const routes: Routes = [
{ path: '', component: AppLoginComponent},

{ path: 'uploadType', component: AppUploadTypeComponent, canActivate: [
AuthGuard]},
{ path: 'uploadType/create', component: AppUploadTypeAddComponent, 
canActivate: [AuthGuard]},
{ path: 'uploadType/edit/:uploadTypeCode', component: 
AppUploadTypeAddComponent, canActivate: [AuthGuard]},
];

@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
providers: [AuthGuard]
})
export class AppRoutingModule {}



*auth-guards.ts*


import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } 
from '@angular/router';
import { Observable } from 'rxjs';
import { Injectable } from '@angular/core';

import { GeneralService } from './general.services';

@Injectable()
export class AuthGuard implements CanActivate {

constructor(
private generalService: GeneralService,
private router: Router
) {}

canActivate(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable|Promise|boolean {
const isAuthorised = this.generalService.getIsUserAuthenticated();

if (!isAuthorised) {
this.router.navigate(['/']);
}
return isAuthorised;
}

}

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Mat-Stepper - How to use the Linear Mode?

2018-10-05 Thread Partha Majumdar
Thanks Mr. Sadocchi.

I find that my form (both the current page and the net page are valid). 
However, it does not step to the next form.

I was using the example given in the material web site. Even in that 
example, I find that in Linear mode, the Stepper does not step to the next 
stage.

Please advice.

Regards,
Partha

On Friday, 5 October 2018 22:06:33 UTC+5:30, Riccardo Sadocchi wrote:
>
>
> It depends on the action that the user has to do in each step, if you have 
> a form to jump in next step the form must be valid
>
> Il giorno venerdì 5 ottobre 2018 18:05:36 UTC+2, Partha Majumdar ha 
> scritto:
>>
>>
>> Dear Sir/Madam,
>>
>> I have defined a set of steps. Now, my program is working perfectly after 
>> a few days of struggle.
>>
>> However, I have set Linear Mode === false. 
>>
>> The issue is that now the user can click to any of the steps and this may 
>> result in them seeing wrong set of data as the step may be from a previous 
>> working of the steps or may not have been executed as we are in some 
>> earlier stage.
>>
>> I tried to make Linear Mode === TRUE. However, after doing then, when I 
>> click on the NEXT button, the stepper does not move to the next stage.
>>
>> I want my users to moves as per the defined steps and no jump between 
>> steps.
>>
>> What do I need doing for this?
>>
>> Thanks in advance.
>>
>> Regards,
>> Partha
>>
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Mat-Stepper - How to use the Linear Mode?

2018-10-05 Thread Partha Majumdar

Dear Sir/Madam,

I have defined a set of steps. Now, my program is working perfectly after a 
few days of struggle.

However, I have set Linear Mode === false. 

The issue is that now the user can click to any of the steps and this may 
result in them seeing wrong set of data as the step may be from a previous 
working of the steps or may not have been executed as we are in some 
earlier stage.

I tried to make Linear Mode === TRUE. However, after doing then, when I 
click on the NEXT button, the stepper does not move to the next stage.

I want my users to moves as per the defined steps and no jump between steps.

What do I need doing for this?

Thanks in advance.

Regards,
Partha

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: 2 Mat-Tables in one html. Pagination not working

2018-10-05 Thread Partha Majumdar
Thanks a lot Mr Sander. It worked like magic.

Regards,
Partha

On Friday, 5 October 2018 09:37:35 UTC+5:30, Sander Elias wrote:
>
> Hi Partha,
>
> html:
>
> 
>
> controller:
>
> @ViewChild('uploadPaginator', {read:MatPaginator}) uploadpgn:MatPaginator;
>
> should do the trick.
>
> Regards
> Sander
> ​
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] 2 Mat-Tables in one html. Pagination not working

2018-10-04 Thread Partha Majumdar


Dear Sir/Madam,


I have implemented a Mat-Stepper. In 2 steps, I show 2 different 
Mat-Tables. On the first page, I show a MAt-Table drawing data from 
uploadDataList and on the second page I draw data from toUploadDataList.


So, I have declared 2 data sources for the Mat-Tables -> uploadData draws 
data from uploadDataList and toUploadData draws data from toUploadDataList.


Now, I have declared 2 Paginators as shown below.


   1. 
   2.   uploadData = new MatTableDataSource(this.uploadDataList);
   3.   toUploadData = new 
MatTableDataSource(this.toUploadDataList);
   4.  
   5.   @ViewChild(MatPaginator) uploadPaginator: MatPaginator;
   6.   // @ViewChild(MatPaginator) toUploadPaginator: MatPaginator;


I assign the 2 Paginators in ngInit() as follows:


   1. 
   2. this.uploadData.paginator = this.uploadPaginator;
   3.  
   4. this.toUploadData.paginator = this.toUploadPaginator;


When I run this program, the paginator on uploadData works as expected and 
changes data as expected.

However, the paginator does not work on toUploadData Mat-Table. It shows 
the same page number as uploadData. However, the data never changes even 
though I can use the arrow keys of the paginator.


Where I am most confused is that how do I link the paginator to the 
appropriate object. In the HTML, I am only writing as follows.


   1. 
   2. 


How do I connect the Mat-Table to the Paginator.


Request your kindly letting me know what is going wrong.


Thanks in advance.


Regards,

Partha

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: Problem after inheritance

2018-09-29 Thread Partha Majumdar
Thanks Mr. Sander.

I have done away with Inheritance.

Partha Majumdar
http://www.partha.majumdar.org



On Sat, Sep 29, 2018 at 9:24 AM Sander Elias  wrote:

> Hi Partha,
>
> You should try to stay away from inheritance as a paradigm. While it
> works, it has a tendency to create hard to maintain apps. The paradigm is
> too easy to abuse, and add extra "levels" in the inheritance chain. This
> makes really hard to debug issues. (I could make a snarky remark here,
> about that you just have proven this ;) )
> There is a reason the gang of 4 stated: "prefer composability over
> inheritance".
>
> In Angular, we have services we can inject, and use to store
> business logic, and/or often used code. You can even use services that just
> accumulate certain other services. And you can use services to hold
> factories.
> This makes it easier to maintain and test your app.
>
> With kind regards
> Sander
>
> --
> 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 angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] MAT-SELECT does not get populated with default value

2018-09-29 Thread Partha Majumdar
Dear Sir/Madam,

I need my MAT-SELECT component to be populated when I enter the form. 
However, the value never gets set.

The HTML File contains the following code:




None

{{module.moduleName}}



The .TS File contains the following:


ngOnInit() {
this.dataForm = new FormGroup({
'moduleCode': new FormControl(null, {validators: [Validators.required, 
Validators.maxLength(10)]}),
'moduleName': new FormControl(null, {validators: [Validators.required, 
Validators.maxLength(255)]}),
'parentModule': new FormControl(null, {validators: [Validators.maxLength(10
)]}),
'parentModuleName': new FormControl(null, {validators: [Validators.maxLength
(255)]}),
'updateUser': new FormControl(null, {validators: [Validators.maxLength(20
)]})
});
this.dummyData = {
moduleCode: '',
moduleName: '',
parentModule: '',
parentModuleName: '',
updateUser: this.dataService.loggedInUser
};

// Get the list of available modules and populate in Parent Module
this.dataService.getData();
this.parentSubscription = this.dataService.getDataUpdatedListener()
.subscribe( (data: Module[]) => {
this.moduleList = data;
// this.refresh();

// Display the current Record
this.route.paramMap.subscribe((paramMap: ParamMap) => {
if (paramMap.has('moduleCode')) {
this.mode = this.EDIT_MODE_INDICATOR;
this.dataCode = paramMap.get('moduleCode');
this.dataService.getOneData(this.dataCode)
.subscribe(fetchedData => {
this.dataToEdit = fetchedData.data;
this.moduleListDisplayed = [...this.moduleList
.filter(parentData => parentData.moduleCode !== this.dataCode)];
this.dataForm.setValue({
'moduleCode': this.dataToEdit.moduleCode.trim(),
'moduleName': this.dataToEdit.moduleName.trim(),
'parentModule': this.dataToEdit.parentModule,
'parentModuleName': this.dataToEdit.parentModuleName,
'updateUser': this.dataService.loggedInUser
});
this.selectedParentModule = this.dataToEdit.parentModule;
alert('SElected Value:' + this.selectedParentModule);
});
} else {
this.mode = this.CREATE_MODE_INDICATOR;
this.dataCode = null;
this.dataToEdit = this.dummyData;
this.moduleListDisplayed = [...this.moduleList];
alert('Total:' + this.moduleList.length + ', Displayed:' + this.
moduleListDisplayed.length);
this.dataForm.setValue({
'moduleCode': this.dummyData.moduleCode,
'moduleName': this.dummyData.moduleName,
'parentModule': this.dummyData.parentModule,
'parentModuleName': this.dummyData.parentModuleName,
'updateUser': this.dataService.loggedInUser
});
}
});
});
}


Please help.

Regards,
Partha











-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Inheritance and Generics

2018-09-28 Thread Partha Majumdar
Thanks Sir.

I tried the same.

After inheriting I am getting the following error.


ERROR TypeError: this.roleService.getData is not a function
at 
AppRoleListComponent.push../src/app/role/role-list/role-list.component.ts.AppRoleListComponent.ngOnInit
 
(role-list.component.ts:41)
at checkAndUpdateDirectiveInline (core.js:9250)
at checkAndUpdateNodeInline (core.js:10514)
at checkAndUpdateNode (core.js:10476)
at debugCheckAndUpdateNode (core.js:11109)
at debugCheckDirectivesFn (core.js:11069)
at Object.eval [as updateDirectives] (AppRoleComponent.html:9)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:11061)
at checkAndUpdateView (core.js:10458)
at callViewAction (core.js:10699)


How can I resolve this?

On searching the internet, I figure that it is some known bug in Angular.

Regards,
Partha

On Friday, 28 September 2018 12:42:09 UTC+5:30, Zlatko Đurić wrote:
>
> In short, yes, you can extend a TypeScript class or implement an 
> interface, and you only need to import the class in the component itself. 
> You can even import a class from a library in your Node modules folder.
> But there are two things to be aware of:
> - you have to make sure that the dependencies are satisfied. E.g. If the 
> abstract class takes a UserService as a constructor parameter, your module 
> (or ultimately your root module) need to provide that service. Sounds 
> obvious, but worth pointing out.
> - the bigger potential issue is that you're extending the TypeScript 
> class, not an Angular-specific component. That means that you have to apply 
> angular decorators to the new class (Injectable, Component etc), anything 
> on the parent class is simply not there.
>
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Problem after inheritance

2018-09-28 Thread Partha Majumdar
Dear Sir/Madam,

My program was working perfectly. Then I decided to forma base class as I 
could generalise. There is no error in the code and it compiles perfectly. 
However, when I run it, it gives this error.

ERROR TypeError: this.roleService.getData is not a function
at AppRoleListComponent.push../src/app/role/role-list/role-list.
component.ts.AppRoleListComponent.ngOnInit (role-list.component.ts:41)
at checkAndUpdateDirectiveInline (core.js:9250)
at checkAndUpdateNodeInline (core.js:10514)
at checkAndUpdateNode (core.js:10476)
at debugCheckAndUpdateNode (core.js:11109)
at debugCheckDirectivesFn (core.js:11069)
at Object.eval [as updateDirectives] (AppRoleComponent.html:9)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:11061)
at checkAndUpdateView (core.js:10458)
at callViewAction (core.js:10699)

Please help resolve.

Regards,
Partha

BASE CLASS:

import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
import { HttpClient } from '@angular/common/http';
import { Router } from '@angular/router';

// import { Currency } from './currency.model';
import { ObjectColumnName } from '../ObjectColumnName';

// import { AppFooterComponent } from '../footer/footer.component';

@Injectable( { providedIn: 'root'} )
export abstract class ModuleService {
protected dataList: T[] = [];
protected dataListUpdated = new Subject();
protected dataFieldNames: ObjectColumnName[] = [];
protected baseURL = 'http://localhost:3000/api';
protected serviceRoute = '';
protected frontEndRouteToNavigate = '';

// private currencyFieldNames = { (id: 1, name:'CurrencyCode'),
// 'CurrencySymbol', 'CurrencyBaseName', 'FractionSymbol', 'FractionName'
// };

// constructor(private httpClient: HttpClient, private router: Router, 
public AppFooter: AppFooterComponent) {}
constructor(protected httpClient: HttpClient, private router: Router) {
// alert('in cons');
// this.setServiceRoute();
}

loggedInUser = 'partham';

getDataFieldNames() {
this.dataFieldNames = [];
this.getFieldNames();
// this.dataFieldNames.push({id: 1, name: 'CurrencyCode'});
// this.dataFieldNames.push({id: 2, name: 'CurrencySymbol'});
// this.dataFieldNames.push({id: 3, name: 'CurrencyBaseName'});
// this.dataFieldNames.push({id: 4, name: 'FractionSymbol'});
// this.dataFieldNames.push({id: 5, name: 'FractionName'});
return this.dataFieldNames;
}

protected abstract getFieldNames(): void;

protected abstract getServiceRoute(): string;

protected abstract setServiceRoute(): void;

// getData() {
// alert(this.baseURL + '/' + this.serviceRoute);
// this.httpClient.get<{message: string, values: T[], recordGoodCount: 
number}>(this.baseURL + '/' + this.serviceRoute)
// .subscribe((returnData) => {
// console.log(returnData.values.length);
// this.dataList = returnData.values;
// this.dataListUpdated.next([...this.dataList]);
// });
// }

abstract getOneData(codeToGet: string);

getDataUpdatedListener() {
return this.dataListUpdated.asObservable();
}

protected abstract getFrontEndRouteToNavigate(): string;

addNewData(newData: T) {
this.httpClient.post<{message: string, returnVal: number}>(this.baseURL + 
'/' + this.serviceRoute, newData)
.subscribe(responseData => {
console.log(responseData.message);
if (responseData.returnVal === 1) {
this.dataList.push(newData);
this.dataListUpdated.next([...this.dataList]);
this.router.navigate([this.frontEndRouteToNavigate]);
} else {
alert('Currency Add Failed');
}
});
}

updateData(codeToSearch: string, dataToUpdate: T) {
this.httpClient
.put<{message: string, returnVal: number}>(this.baseURL + '/' + this.
serviceRoute + '/' + codeToSearch, dataToUpdate)
.subscribe((returnValue) => {
if (returnValue.returnVal === 1) {
const updatedCurrencies = [...this.dataList];
const oldCurrencyIndex = this.getOldCurrencyIndex(updatedCurrencies, 
codeToSearch);
// updatedCurrencies.findIndex(c => c.currencyCode === 
this.codeToSearchForUpdate());
updatedCurrencies[oldCurrencyIndex] = dataToUpdate;
this.dataList = updatedCurrencies;
this.dataListUpdated.next([...this.dataList]);
this.router.navigate([this.getFrontEndRouteToNavigate()]);
} else {
alert('Currency Update Failed');
}
});
}

protected abstract getOldCurrencyIndex(dataToSearch: T[], codeToSearch: 
string): number;

deleteData(dataCode: string) {
// const dummy: T = {
// currencyCode: '',
// currencySymbol: '',
// currencyBaseName: '',
// fractionSymbol: '',
// fractionName: '',
// updateUser: this.loggedInUser
// };
const dummy = this.createDummy();

this.httpClient.patch<{message: string, returnVal: number}>(this.baseURL + 
'/' + this.serviceRoute + '/' + dataCode, dummy)
.subscribe((returnValue) => {
if (returnValue.returnVal === 1) {
const updatedData = this.getRecordsAfterDelete(dataCode); // 
this.dataList.filter(data => data.currencyCode !== dataCode);
this.dataList = updatedData;
this.dataListUpdated.next([...this.dataList]);
} else {
// alert('Currency Delete Failed');
}
});
}

protected abstract 

[AngularJS] How to capture the HTTP Response

2018-09-27 Thread Partha Majumdar
Dear Sir/Madam,

The following program works when there is data in the table. I want to 
capture the situation when the server side code returns no data. 

How do I capture the response status?

Please help.

Regards,
Partha

*Angular Side Code:*

constructor(private httpClient: HttpClient, private router: Router) {}

getRoles() {
this.httpClient
.get<{message: string, roles: Role[], recordGoodCount: number}>(
'http://localhost:3000/api/role')
.subscribe((roleData) => {
alert(roleData.roles.length);
this.roleList = roleData.roles;
this.roleListUpdated.next([...this.roleList]);
});
}



*Server Side Code:*


router.get("", (request, response, next) => {
(async () => {
const SQLStatement = "SELECT PF_ROLE_CODE roleCode, PF_ROLE_NAME roleName 
FROM PT_ROLE WHERE PF_DLTD = 'N';";

returnValue = await executeSQL(SQLStatement);
console.log(returnValue[0]);
rolesFetched = [];
recordCount = 0;
returnValue.forEach(element => {
element.forEach(ele => {
recordCount ++;
rolesFetched.push({
roleCode: ele.ROLECODE,
roleName: ele.ROLENAME,
updateUser: ''
});
})
});
console.log(recordCount);

if(recordCount > 0) {
response.status(200).json({
message: 'Roles fetched successfully',
roles: rolesFetched,
recordGoodCount: recordCount
});
} else {
response.status(404).json({
message: 'Roles fetch failed'
});
}
})();
});

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Object literal may only specify known properties

2018-09-27 Thread Partha Majumdar
Thanks Mr. Sander.

I have learnt this now. My strategy is that when I am developing a new 
module, I switch off the server. After completing the code, I start the 
server and compile.

Regards,
Partha

On Thursday, 27 September 2018 11:34:18 UTC+5:30, Sander Elias wrote:
>
> Hi Partha,
>
> In case of strange compilation issues, restart your `ng serve`. Picking up 
> changes sometimes fails. Some os's have more trouble with this as others. 
> If that doesn't help, feel free to ask more/again.
>
> Regards
> Sander
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Object literal may only specify known properties

2018-09-26 Thread Partha Majumdar
Dear Sir/Madam,

I had a perfectly working program. In this program, I used a interface for 
the data being handled. I named it Currency.

Currency was defined as follows:
export interface Currency {
currencyCode: string;
currencySymbol: string;
currencyBaseName: string;
fractionSymbol: string;
fractionName: string;
}

Then I made a change to the interface and introduced another attribute so 
that it looks like this.
export interface Currency {
currencyCode: string;
currencySymbol: string;
currencyBaseName: string;
fractionSymbol: string;
fractionName: string;
updateUser: string;
}

After this change, I have updated my program so that this attribute is 
available in the Currency instance whenever it is used. However, I am 
getting the following compilation error.
ERROR in src/app/currency/currencyAdd/currencyAdd.component.ts(40,9): error 
TS2322: Type '{ currencyCode: string; currencySymbol: string; 
currencyBaseName: string; fractionSymbol: string;...' is not assignable to 
type 'Currency'.
  Object literal may only specify known properties, and 'updateUser' does 
not exist in type 'Currency'.
src/app/currency/currencyAdd/currencyAdd.component.ts(86,11): error TS2322: 
Type '{ currencyCode: any; currencySymbol: any; currencyBaseName: any; 
fractionSymbol: any; fractionNam...' is not assignable to type 'Currency'.
  Object literal may only specify known properties, and 'updateUser' does 
not exist in type 'Currency'.
src/app/currency/currencyAdd/currencyAdd.component.ts(114,11): error TS2322: 
Type '{ currencyCode: string; currencySymbol: any; currencyBaseName: any; 
fractionSymbol: any;fraction...' is not assignable to type 'Currency'.
  Object literal may only specify known properties, and 'updateUser' does 
not exist in type 'Currency'.
src/app/currency/currencyUpload/currencyUpload.component.ts(344,41): error 
TS2322: Type '{ currencyRecord: { currencyCode: string; currencySymbol: 
string; currencyBaseName: string; fract...' is not assignable to type 
'UploadCurrency'.
  Types of property 'currencyRecord' are incompatible.
Type '{ currencyCode: string; currencySymbol: string; currencyBaseName: 
string; fractionSymbol: string;...' is not assignable to type 'Currency'.
  Object literal may only specify known properties, and 'updateUser' 
does not exist in type 'Currency'.

Now, the code at src/app/currency/currencyAdd/currencyAdd.component.ts(86,11) 
is as follows:

[image: err.jpeg]





Request your kind advice to resolve this issue.

Thanks and Regards,
Partha









-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Application cannot compile after I created mime-type.validator.ts

2018-09-26 Thread Partha Majumdar
Thanks as always, Mr. Sander.

I stopped the server and deleted the file and then restarted the server. It 
works now.

Regards,
Partha

On Wednesday, 26 September 2018 21:42:19 UTC+5:30, Sander Elias wrote:
>
> Hi Partha,
>
> Did you try restarting your build tool? Stop ng serve, delete file, and ng 
> serve once more.
> If that’s not working, it’s referenced somewhere else in your project, do 
> a project-wide search for the file name (without .ts)
>
> Regards
> Sander
> ​
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Data not refreshed after Deleting from List

2018-09-25 Thread Partha Majumdar
You are right Mr. Sander.

The service is returning empty response.

I am reading to rectify that.

Thanks for your kind support.

Regards,
Partha

On Tuesday, 25 September 2018 09:51:24 UTC+5:30, Sander Elias wrote:
>
> Hi Partha,
>
> > The alerts I have placed are never fired.
>
> You mean the alerts in your first msg? If those are not fired, the 
> response from your node server is not reaching back your app. I just 
> noticed you are returning a 201. This might be the problem. Can you try 
> with a code 200?
> (BTW 201 means a successful creation, that's a strange response on a 
> delete...)
> Also, you should add an error-handling part in your service. checkout how 
> to handle errors in observables. hint the CatchError operator is your 
> friend.
>
> Regards
> Sander
>
>
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Data not refreshed after Deleting from List

2018-09-24 Thread Partha Majumdar
The alerts I have placed are never fired.

On Tuesday, 25 September 2018 08:29:33 UTC+5:30, Partha Majumdar wrote:
>
> Dear Mr. Sander,
>
> I have subscribed to the listener in ngOnInit().
> The code is given below. I have doubt whether this is okay.
>
> This code I had written in ngOnInit(). Later I moved it to a function so 
> that I could call it from ngOnChange() as well. However, I am certain this 
> approach is not correct.
>
> Please advice.
>
> Regards,
> Partha
>
>
> ngOnInit() {
> this.refresh();
> }
>
> refresh() {
> this.isLoading = true;
> this.currencyService.getCurrencies();
> this.currencySubscription = this.currencyService.
> getCurrencyUpdatedListener()
> .subscribe( (currencies: Currency[]) => {
> this.currencyList = currencies;
> this.currencyData.data = this.currencyList;
> });
> this.currencyData.paginator = this.paginator;
> this.currencyData.sort = this.sort;
> this.isLoading = false;
> }
>
>
>
>
>
> On Tuesday, 25 September 2018 08:15:41 UTC+5:30, Sander Elias wrote:
>>
>> Hi Partha,
>>
>> Your code is ok. If the currency is not disappearing from the view, the 
>> mistake is not in this part. Are you sure you subscribed to the 
>> currencyListUpdated observable?
>>
>> Regards
>> Sander
>> ​
>>
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Data not refreshed after Deleting from List

2018-09-24 Thread Partha Majumdar
Dear Mr. Sander,

I have subscribed to the listener in ngOnInit().
The code is given below. I have doubt whether this is okay.

This code I had written in ngOnInit(). Later I moved it to a function so 
that I could call it from ngOnChange() as well. However, I am certain this 
approach is not correct.

Please advice.

Regards,
Partha


ngOnInit() {
this.refresh();
}

refresh() {
this.isLoading = true;
this.currencyService.getCurrencies();
this.currencySubscription = this.currencyService.getCurrencyUpdatedListener
()
.subscribe( (currencies: Currency[]) => {
this.currencyList = currencies;
this.currencyData.data = this.currencyList;
});
this.currencyData.paginator = this.paginator;
this.currencyData.sort = this.sort;
this.isLoading = false;
}





On Tuesday, 25 September 2018 08:15:41 UTC+5:30, Sander Elias wrote:
>
> Hi Partha,
>
> Your code is ok. If the currency is not disappearing from the view, the 
> mistake is not in this part. Are you sure you subscribed to the 
> currencyListUpdated observable?
>
> Regards
> Sander
> ​
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Data not refreshed after Deleting from List

2018-09-24 Thread Partha Majumdar
Dear Sir/Madam,

I am new to Angular. I have started programming using Angular and Node 
since 17-Sep-2018.

I have a page where I display a list of currencies and allow for deleting 
individual currencies from the list.

On clicking the Delete button, the onDelete() function is firing properly 
and calling the DeleteCurrency() service. The message is propagated to my 
node service and the data is deleted from the database. However, when the 
reply is received, the list should refresh without the deleted currency. 
This is not happening.

I am attaching my angular and node code for your kind reference.

Please help.

Regards,
Partha

*** ANGULAR SIDE OF TE CODE ***

deleteCurrency(currencyCode: string) {
this.httpClient.delete<{message: string}>(
'http://localhost:3000/api/currency/' + currencyCode)
.subscribe(() => {
alert('BEFORE DELETE:' + this.currencyList.length);
const updatedCurrencies = this.currencyList.filter(currency => currency.
currencyCode !== currencyCode);
this.currencyList = updatedCurrencies;
alert('AFTER DELETE:' + this.currencyList.length);
this.currencyListUpdated.next([...this.currencyList]);
});
}

*** CODE ON NODE JS ***


router.delete("/:currencyCode", (request, response, next) => {
(async () => {
const SQLCurrencyDeleteStatement = "DELETE CURRENCY " +
" WHERE CURRENCY_CODE = " + "'" + request.params.currencyCode + "';";
console.log(SQLCurrencyDeleteStatement);

returnValue = await executeUpdate(paikariConn, SQLCurrencyDeleteStatement);
console.log(returnValue);
response.status(201).json({
message: "Currency deleted successfully"
});
})();
});


-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Unable to update variables as OnInit() is not firing

2018-09-24 Thread Partha Majumdar
Thanks. It is working as I need it to.

On Sunday, 23 September 2018 11:13:42 UTC+5:30, Sander Elias wrote:
>
> Hi Partha,
>
> On first glance of your code, nothing springs out. I think this should 
> work. Can you put your issue on a stackBlitz 
> ?
>
> Regards
> Sander
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Unable to update variables as OnInit() is not firing

2018-09-24 Thread Partha Majumdar
Thanks. It is working as I need it to.

On Sunday, 23 September 2018 23:47:22 UTC+5:30, Adolfo Cueto wrote:
>
> your code is ok, but come on try to send us your service code and 
> template..
>
> El sábado, 22 de septiembre de 2018, 8:40:47 (UTC-5), Partha Majumdar 
> escribió:
>>
>> Dear Sir/Madam,
>>
>>
>> I am new to Angular.JS.
>>
>>
>> I want a part of my HTML Page to be updated with some data. For the data, 
>> I have written a service and this is returning the data correctly as 
>> fetched from the database. However, this is not getting displayed on the 
>> page.
>>
>>
>> I have written a OnInit(). However, OnInit() method is never getting 
>> fired.
>>
>> The variables are referred in the corresponding HTML Files and should 
>> display the values as stored in these variables. Also, as the data changes, 
>> the listener should update the values.
>>
>>
>> Please help me solve this.
>>
>>
>> Thanks and Regards,
>> Partha
>>
>>
>> import { Component, OnInit } from '@angular/core';
>> import { Subscription } from 'rxjs';
>>
>> import { Currency } from '../currency.model';
>> import { CurrencyService } from '../currency.service';
>>
>> @Component({
>> selector: 'app-Currency-Statistics',
>> templateUrl: './currencyStatistics.component.html',
>> styleUrls: ['./currencyStatistics.component.css']
>> })
>> export class AppCurrencyStatisticsComponent implements OnInit {
>>   strActiveCurrencies = '';
>>   strDeletedRecords = '7';
>>   strLastUpdatedBy = 'partham';
>>   currencyList: Currency[] = [];
>>   private currencySubscription: Subscription;
>>
>>   constructor(public currencyService: CurrencyService) {}
>>
>>   ngOnInit() {
>> this.strActiveCurrencies = 
>> this.currencyService.getRecordCount().toString();
>> alert('Currency Count:' + this.strActiveCurrencies);
>> this.currencySubscription = 
>> this.currencyService.getCurrencyUpdatedListener()
>> .subscribe( (currencies: Currency[]) => {
>> this.currencyList = currencies;
>> // this.refresh();
>> });
>>   }
>>
>> }
>>
>>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Dialog does not open

2018-09-22 Thread Partha Majumdar
Dear Sir/Madam,

I am new to Angular programming.

I am trying to open a dialog for editing and deleting data.

This form has a list which I fetch from the database. When I click a row on 
this list, the dialog should open for editing and deleting. 

For fetching the data, I have defined a service which I supply in the 
constructor. Now, for opening the dialog, I understood from the code 
example that I should create a constructor for that. However, in a class, 
there can be only one constructor. So, when I pass the service and the 
dialog in the constructor, the service stops functioning and also the 
dialog does not open.

When I click a row in the list, I can see that the code for opening the 
dialog is fired. However, the dialog does not open.

Please find the code file below.

Please help.

Regards,
Partha


import { Component, ViewChild, OnInit, OnDestroy, Inject } from 
'@angular/core';
import { MatPaginator, MatTableDataSource, MatSort } from 
'@angular/material';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material';
import { Subscription } from 'rxjs';
import { NgForm } from '@angular/forms';

import { Currency } from '../currency.model';
import { CurrencyService } from '../currency.service';

// const ELEMENT_DATA: Currency[] = [
// {currencyCode: "INR", currencySymbol: "INR", currencyBaseName: "Indian 
Rupees", fractionSymbol: ".", fractionName: "Decimal"},
// {currencyCode: "EUR", currencySymbol: "EUR", currencyBaseName: "Euro", 
fractionSymbol: ",", fractionName: "Comma"},
// {currencyCode: "USD", currencySymbol: "USD", currencyBaseName: "US 
Dollar", fractionSymbol: ".", fractionName: "Decimal"},
// {currencyCode: "THB", currencySymbol: "THB", currencyBaseName: "Thai 
Baht", fractionSymbol: ".", fractionName: "Decimal"}
// ];

@Component({
selector: 'app-Currency-List',
templateUrl: './currencyList.component.html',
styleUrls: ['./currencyList.component.css']
})
export class AppCurrencyListComponent implements OnInit, OnDestroy {
// @Input() currencyList: Currency[] = ELEMENT_DATA;
currencyList: Currency[] = [];
private currencySubscription: Subscription;
selectedCurrency: Currency;
public dialog: MatDialog;

constructor(public currencyService: CurrencyService) {}

// constructor(public dialog: MatDialog) {}

displayedColumns: string[] = ['currencyCode', 'currencySymbol', 
'currencyBaseName', 'fractionSymbol', 'fractionName'];
// currencyData = new MatTableDataSource(ELEMENT_DATA);
currencyData = new MatTableDataSource(this.currencyList);

@ViewChild(MatPaginator) paginator: MatPaginator;

@ViewChild(MatSort) sort: MatSort;

ngOnInit() {
alert('Cur List: getcurrencies');
this.currencyService.getCurrencies();
this.currencySubscription = this.currencyService.getCurrencyUpdatedListener
()
.subscribe( (currencies: Currency[]) => {
this.currencyList = currencies;
this.refresh();
});
this.currencyData.paginator = this.paginator;
this.currencyData.sort = this.sort;
}

applyFilter(filterValue: string) {
this.currencyData.filter = filterValue.trim().toLowerCase();
}

refresh() {
this.currencyData.data = this.currencyList;
}

ngOnDestroy() {
this.currencySubscription.unsubscribe();
}

rowClicked(row: Currency): void {
// alert(row.currencyCode);
this.selectedCurrency = {
currencyCode: row.currencyCode,
currencySymbol: row.currencySymbol,
currencyBaseName: row.currencyBaseName,
fractionSymbol: row.fractionSymbol,
fractionName: row.fractionName
};
// alert(this.selectedCurrency.currencyCode);

const dialogRef = this.dialog.open(CurrencyEditDeleteDialogComponent, {
width: '250px',
data: {
currencyCode: this.selectedCurrency.currencyCode,
currencySymbol: this.selectedCurrency.currencySymbol,
currencyBaseName: this.selectedCurrency.currencyBaseName,
fractionSymbol: this.selectedCurrency.fractionSymbol,
fractionName: this.selectedCurrency.fractionName
}
});

dialogRef.afterClosed().subscribe(result => {
console.log('The dialog was closed');
// this.animal = result;
});
}
}

@Component({
selector: 'dialog-currency-edit-delete',
templateUrl: 'dialog-currency-edit-delete.html',
})
export class CurrencyEditDeleteDialogComponent {

constructor(
public dialogRef: MatDialogRef,
@Inject(MAT_DIALOG_DATA) public data: Currency) {}

onNoClick(): void {
this.dialogRef.close();
}

onEditCurrency(form: NgForm) {
alert('In Edit Currency');
}

onDeleteCurrency(form: NgForm) {
alert('In Delete Currency');
}
}

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Unable to update variables as OnInit() is not firing

2018-09-22 Thread Partha Majumdar


Dear Sir/Madam,


I am new to Angular.JS.


I want a part of my HTML Page to be updated with some data. For the data, I 
have written a service and this is returning the data correctly as fetched 
from the database. However, this is not getting displayed on the page.


I have written a OnInit(). However, OnInit() method is never getting fired.

The variables are referred in the corresponding HTML Files and should 
display the values as stored in these variables. Also, as the data changes, 
the listener should update the values.


Please help me solve this.


Thanks and Regards,
Partha


import { Component, OnInit } from '@angular/core';
import { Subscription } from 'rxjs';

import { Currency } from '../currency.model';
import { CurrencyService } from '../currency.service';

@Component({
selector: 'app-Currency-Statistics',
templateUrl: './currencyStatistics.component.html',
styleUrls: ['./currencyStatistics.component.css']
})
export class AppCurrencyStatisticsComponent implements OnInit {
  strActiveCurrencies = '';
  strDeletedRecords = '7';
  strLastUpdatedBy = 'partham';
  currencyList: Currency[] = [];
  private currencySubscription: Subscription;

  constructor(public currencyService: CurrencyService) {}

  ngOnInit() {
this.strActiveCurrencies = this.currencyService.getRecordCount().toString();
alert('Currency Count:' + this.strActiveCurrencies);
this.currencySubscription = 
this.currencyService.getCurrencyUpdatedListener()
.subscribe( (currencies: Currency[]) => {
this.currencyList = currencies;
// this.refresh();
});
  }

}

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.