[AngularJS] Not able to update DOM of Child Components

2018-10-26 Thread Rohit Mishra
Hi Everyone,
I  am working on a Angular 6 application which has layout component(parent)
and MatterComponent as (child) ,
i am calling the function of the child component from parent component ,
and it works i can se the function working the data in the .ts file has
being changed.
but the child component is already initailized and the ngFor is not
updating the DOM. with the new value.

please help.

thanks ,
Rohit.
below is the code:

//parentComponent
if(result.value === true){
this.snackbar.open(`${this.terminlogies.L1} ${result.addmsg} sucessfully`,
'close', {
duration: 4000
});
this.mattercomponent.groupFind;
this.mattercomponent.matterFind;
}

//ChildComponent
groupFind(){
this._group.find({
where: {
active: true,
},
include: {
relation: 'clients',
scope: {
include: {
relation: 'matters',
}
}
}
}).subscribe((res:any)=>{
this.groups_data=res;
let clientList = [];
let matterList = [];
res.forEach(function(group:any){
group.clients.forEach(function(client){
clientList.push(client);
client.matters.forEach(function(matter){
matterList.push(matter);
})
})
})
this.clients_data=clientList
this.matter_data=matterList
console.log(groups_data)<--
can see it in console but DOM is not updated.
},
err=>{
console.log(err)
}
)
}


//childComponent HTML


-- 
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: disable not working in ng-options in angularjs v1.1.5

2018-10-26 Thread Sander Elias
Hi Arun,

By backporting all the fixes from 1.5 to 1.1.
Is there a reason you can't upgrade to a newer version?

Regards
Sandeer

-- 
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: Can't resolve all parameters when using ng --prod

2018-10-26 Thread Anthony Pri
I fixed it thanks.

On Fri, Oct 26, 2018 at 12:15 AM Sander Elias  wrote:

> Hi Anthony,
>
> constructor(private allowedRoles:string[], private router:Router) {}
>
> The injector does not know what to inject for `string[]`. Don't declare
> private variables like that. define them on the class itself.
>
> Regards
> Sander
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Angular and AngularJS discussion" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/angular/b5OtWpct31o/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>


-- 

Anthony P
(919) 671-7234

-- 
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: Can't resolve all parameters when using ng --prod

2018-10-26 Thread Anthony Pri
Define them on the class? do you have example. thanks

On Fri, Oct 26, 2018 at 12:15 AM Sander Elias  wrote:

> Hi Anthony,
>
> constructor(private allowedRoles:string[], private router:Router) {}
>
> The injector does not know what to inject for `string[]`. Don't declare
> private variables like that. define them on the class itself.
>
> Regards
> Sander
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Angular and AngularJS discussion" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/angular/b5OtWpct31o/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>


-- 

Anthony P
(919) 671-7234

-- 
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: http get and service usages

2018-10-26 Thread Sander Elias
Hi Stéphane,

Both are possible. It's mostly a matter of preference. 

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]

2018-10-26 Thread mahesh reddy
Can any body help me how to add  child rows in subitems using anjularjs??
If any one know please let me know.

-- 
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] How to upload dynamic data with jspdf in angular 5

2018-10-26 Thread amit sutar
I am using angular 5 with laravel. generating pdf with jspdf of html 
component. its working but dynamic data is not visible in pdf file.

public captureScreen() 
{ 
let data2pdf = this.store_sales_invoice;
var data = document.getElementById('contentToConvert'); 
html2canvas(data).then(canvas => { 
// Few necessary setting options 
var imgWidth = 208; 
var pageHeight = 295; 
var imgHeight = canvas.height * imgWidth / canvas.width; 
var heightLeft = imgHeight; 
const contentDataURL = canvas.toDataURL('image/png') 
let pdf = new jsPDF('p', 'mm', 'a4'); // A4 size page of PDF 
var position = 0; 
pdf.addImage(contentDataURL, 'PNG', 0, position, imgWidth, imgHeight) 
pdf.save('data.pdf'); // Generated PDF 
}); 
} 



-- 
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: disable not working in ng-options in angularjs v1.1.5

2018-10-26 Thread Arun kumar
Hi sander,

I can't upgrade to newer version, the company I am working, they are using 
older version they won't upgrade whole application for a single enhancement.
Any workaround on using 'disable when' in ng-repeat ?

On Friday, October 26, 2018 at 8:25:25 PM UTC+5:30, Sander Elias wrote:
>
> Hi Arun,
>
> By backporting all the fixes from 1.5 to 1.1.
> Is there a reason you can't upgrade to a newer version?
>
> Regards
> Sandeer
>

-- 
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.


Re: [AngularJS]

2018-10-26 Thread ACHARYA ANIL KUMAR
Hi ,

you can dynamically add nested array then put nested ng -repeat

On Fri, Oct 26, 2018 at 8:50 PM mahesh reddy 
wrote:

> Can any body help me how to add  child rows in subitems using anjularjs??
> If any one know please let me know.
>
> --
> 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.
>


-- 

Thanks and Regards

Anil Kumar

S/W Engineer |  Patanjali Social Activist | Speaker |Yoga Trainer

 Mob:- +918930068008

 My Social Media Links

Facebook:- *https://www.facebook.com/acharyaks90
*

Twitter:-   *https://twitter.com/acharyaks90
*

Github:-   *https://github.com/acharyaks90
*

LinkedIn:- https://www.linkedin.com/in/acharyaks90/

-- 
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]

2018-10-26 Thread mahesh reddy
hi,
Can you please share some sample code It can helpfull to me
 Thanks & Regards
Mahesh Reddy

On Sat, Oct 27, 2018 at 9:36 AM ACHARYA ANIL KUMAR 
wrote:

> Hi ,
>
> you can dynamically add nested array then put nested ng -repeat
>
> On Fri, Oct 26, 2018 at 8:50 PM mahesh reddy 
> wrote:
>
>> Can any body help me how to add  child rows in subitems using anjularjs??
>> If any one know please let me know.
>>
>> --
>> 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.
>>
>
>
> --
>
> Thanks and Regards
>
> Anil Kumar
>
> S/W Engineer |  Patanjali Social Activist | Speaker |Yoga Trainer
>
>  Mob:- +918930068008
>
>  My Social Media Links
>
> Facebook:- *https://www.facebook.com/acharyaks90
> *
>
> Twitter:-   *https://twitter.com/acharyaks90
> *
>
> Github:-   *https://github.com/acharyaks90
> *
>
> LinkedIn:- https://www.linkedin.com/in/acharyaks90/
>
>
>
> --
> 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]

2018-10-26 Thread mahesh reddy
hi,
  My requirement is i want to add/delete rows in nested ng -repeat and
nested array I.e means In child row  i want add/remove rows dynamically.

can you please suggest me.
Thanks & Regards
Mahesh Reddy

On Sat, Oct 27, 2018 at 9:51 AM mahesh reddy 
wrote:

> hi,
> Can you please share some sample code It can helpfull to me
>  Thanks & Regards
> Mahesh Reddy
>
> On Sat, Oct 27, 2018 at 9:36 AM ACHARYA ANIL KUMAR <
> thakurinfot...@gmail.com> wrote:
>
>> Hi ,
>>
>> you can dynamically add nested array then put nested ng -repeat
>>
>> On Fri, Oct 26, 2018 at 8:50 PM mahesh reddy 
>> wrote:
>>
>>> Can any body help me how to add  child rows in subitems using anjularjs??
>>> If any one know please let me know.
>>>
>>> --
>>> 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.
>>>
>>
>>
>> --
>>
>> Thanks and Regards
>>
>> Anil Kumar
>>
>> S/W Engineer |  Patanjali Social Activist | Speaker |Yoga Trainer
>>
>>  Mob:- +918930068008
>>
>>  My Social Media Links
>>
>> Facebook:- *https://www.facebook.com/acharyaks90
>> *
>>
>> Twitter:-   *https://twitter.com/acharyaks90
>> *
>>
>> Github:-   *https://github.com/acharyaks90
>> *
>>
>> LinkedIn:- https://www.linkedin.com/in/acharyaks90/
>>
>>
>>
>> --
>> 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: HTML links to routes in Angular app

2018-10-26 Thread Sander Elias
Hi Shweta,

Hmm, wrote it a while ago. Typescript got better in the meantime ;)
Updated the typings for you:

import { AfterViewInit, ContentChildren, Directive, ElementRef, QueryList, 
ViewChildren } from '@angular/core';
import { Router, RouterLink } from '@angular/router';

@Directive({ selector: '[rewriteAnchors]' })
export class RewriteAnchorDirective implements AfterViewInit {
  @ViewChildren(RouterLink)
  AnchorsInView: QueryList;
  @ContentChildren(RouterLink)
  AnchorsInContent: QueryList;

  constructor(private el: ElementRef, private router: Router) {}

  ngAfterViewInit() {
const el = this.el.nativeElement;
//window.el = el;
console.log(this.AnchorsInView, this.AnchorsInContent, el);
if (el) {
  // this code only gets run in the browser, as other envs have (akaik) 
no nativeelement
  const links = Array.from(el.querySelectorAll('a'))
.filter(l => !l.hasAttribute('ng-reflect-router-link'))
.map(l => (console.log(l), l))
.forEach(l => l.addEventListener('click', this.reroute(this)));
}
  }

  reroute(me) {
// use the closure to keep a reference to me(this)
return function reroute(ev) {
  // might be confusing, but 'this' points to the element
  // orignating the click.
  ev.preventDefault();
  const url = this.getAttribute('href');
  me.router.navigateByUrl(url);
};
  }
}

This will fix the typing issues.
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: HTML links to routes in Angular app

2018-10-26 Thread Shweta Sinha
Hi Sander,

This is perfect and exactly what I am looking for..
I tried using the code and modify it to use but its not working for Angular 
6. giving error "property does not exist on type" for has attribute and 
addEventlistner and 

class name not for QueryList,  

I am new to Angular and want to capture attribute from external file in 
angular to route. 

Thanks
Shweta


On Friday, August 4, 2017 at 3:25:05 PM UTC+5:30, Sander Elias wrote:
>
> Hi Thomas,
>
> Here is a directive that takes anchors and rewrites them to use the router.
>
> import { Directive, ElementRef, ContentChildren, ViewChildren } from 
> '@angular/core';
> import { Router, RouterLink  } from '@angular/router'
>
>
> @Directive({ selector: '[rewriteAnchors]' })
> export class rewriteAnchors {
> 
> @ViewChildren(RouterLink) AnchorsInView: QueryList;
> @ContentChildren( RouterLink) AnchorsInContent: QueryList;
> 
> 
> constructor(
>   private el: ElementRef,
>   private router: Router
> ) { }
> 
> ngAfterViewInit() {
>   const el = this.el.nativeElement;
>   //window.el = el;
>   console.log(this.AnchorsInView, this.AnchorsInContent, el)
>   if (el) {  
> // this code only gets run in the browser, as other envs have 
> (akaik) no nativeelement
> const links = Array.from(el.querySelectorAll("a"))
>   .filter(l => !l.hasAttribute('ng-reflect-router-link'))
>   .map(l => (console.log(l),l))
>   .forEach(l => l.addEventListener('click', this.reroute(this)))
>   ;
>   } 
> }
> 
>   
> reroute(me) {
>   // use the closure to keep a reference to me(this)
>   return function reroute(ev) {
> // might be confusing, but 'this' points to the element 
> // orignating the click.
> ev.preventDefault(); 
> const url = this.getAttribute("href")
> me.router.navigateByUrl(url);
>   };
> }
> }
>
>
>
> Is that what you are looking for?
>
> 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] disable not working in ng-options in angularjs v1.1.5

2018-10-26 Thread Arun kumar
Hi,

I am implementing this below link code into my code, but the disable 
keyword is not working in v1.1.5, currently it's wokring v1.4
any workaround to use disable in ng-options

here's the working link which uses angularjs v1.4
http://plnkr.co/edit/doIGPIa8KJRBnhPTBJKJ?p=preview


how do I get disale working in ng-options in v1.1.4

-- 
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: HTML links to routes in Angular app

2018-10-26 Thread Shweta
Hi Sander, 
Thanks for the update!!
Error has gone and code works as expected.

I have one question what does 'ng-reflect-router-link' do in the code. Not able 
to understand that line.


regards

Shweta

-- 
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.