[AngularJS] Re: Modal window and dynamic content

2019-04-08 Thread Emil Stoyanov
Hi,

Did You try this: http://dwmkerr.github.io/angular-modal-service/
Works good for me, it is a service, so you can load different templates in 
each situation.

On Monday, April 8, 2019 at 4:31:26 PM UTC+3, Dev C wrote:
>
> I need to have dynamic modal window at many places so i need to have 
> reasonable modal window but the content of the modal should be dynamic , i 
> heard of having ng-content so can have this as reusable content?
>
> -- 
> Sent from my mi note 4 phone.
>

-- 
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: retrieving focus after components updated

2019-04-08 Thread Stéphane Ancelot
Continuing more searches , I found this explanation against change 
propagation and more particulary ngFor I am suing to create my table.
https://angular.io/api/common/NgForOf#change-propagation

Using trackBy may then help solving this issue.


Le vendredi 5 avril 2019 15:06:36 UTC+2, Stéphane Ancelot a écrit :
>
> Hi,
>
> I have got a list of components organized in table rows.
>
> each time a row is modifed, the data are sent to the backend and returned 
> back to the application with updated fields.
>
> the view is rebuilt with these data and my focus lost.
>
> The problem is that I will have to focus again the field that was selected 
> before the view was rebuilt with the new data.
>
> Regards,
> S.Ancelot
>
>

-- 
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: retrieving focus after components updated

2019-04-08 Thread Stéphane Ancelot
So , I am thinking to another implementation. 
The aim  of my focus management was trying to implement an excel like 
navigation.
To do this, I created a directive associated to each input. And then being 
managed in the childs row component.
I think this should be managed by the parent table component to avoid this 
kind of problem.
Either with a service or other implementation.
After few searches, I found angular material had a FocusMonitor service.
This may help me solving my issue*." It's more powerful than just listening 
for focus or blurevents because it tells you how the element was focused 
(via mouse, keyboard, touch, or programmatically). It also allows listening 
for focus on descendant elements if desired."*
https://material.angular.io/cdk/a11y/overview


Le vendredi 5 avril 2019 15:06:36 UTC+2, Stéphane Ancelot a écrit :
>
> Hi,
>
> I have got a list of components organized in table rows.
>
> each time a row is modifed, the data are sent to the backend and returned 
> back to the application with updated fields.
>
> the view is rebuilt with these data and my focus lost.
>
> The problem is that I will have to focus again the field that was selected 
> before the view was rebuilt with the new data.
>
> Regards,
> S.Ancelot
>
>

-- 
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: ProtractorTimesOutONAngularApps

2019-04-08 Thread Priyanka P
Are there any compatibility issues with latest angular version and 
protractor?

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

2019-04-08 Thread Priyanka P

I am trying to automate an angular application.
I expect Protractor waits until there are no pending asynchronous tasks in 
my Angular application Before performing any action, 

But in my case , it times out with the default time out. I even increased 
time to 30 secs. I get the following error.

 Failed: script timeout: result was not received in 30 seconds

Why does protractor not handle the angular app time outs? if I Disable 
waitForAngularEnabled, then what is the use of protractor and angular 
automation???


-- 
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] Unable to find Elements with _ngcontent

2019-04-08 Thread Priyanka P
This seems more like a sync issues than locating elements.
When I disable synchronisation, it does locate the element.

However this is an angular app. And I am expecting that Protractor waits 
for the page to be loaded and the new URL to appear before continuing.

Can someone suggest how to handle the angualr synchronizations without 
having to 'Disable' 'waitforAngular'??

I increased the time out to 20 secs as 10 was default. It still times out.

Obviously I do not want to use control flow as that is soon going to be 
deprecated.

But why does protractor can't handle the angular browser page timeouts???



On Tuesday, April 9, 2019 at 10:41:15 AM UTC+10, Priyanka P wrote:
>
> This response is irrelevant.
> That doesn't answer my question
>
> On Monday, April 8, 2019 at 10:25:37 PM UTC+10, Dattaram Hodawadekar wrote:
>>
>>
>> https://stackblitz.com/edit/angular-get-el-by-class-name?file=src%2Fapp%2Fapp.component.ts
>>  
>>  
>>
>> On Mon, Apr 8, 2019 at 12:34 PM Priyanka P  wrote:
>>
>>> Following is the element on page. Im trying to click on the element 
>>> specified in yellow below.
>>>
>>>
>>> Following are the ways I tried to identify the element.
>>>
>>> None of them identify the locator. Please help 
>>>
>>>
>>>1. await element(by.css("a[class*='login']")).click();
>>>2. await element(by.linkText('Login')).click();
>>>3. await element(by.css("a[class='class="button login transparent 
>>> ng-star-inserted']")).click();
>>>4. await element(by.css('.button login transparent 
>>> ng-star-inserted')).click();
>>>5.  await element(by.css('a.button login transparent 
>>> ng-star-inserted')).click();
>>>6.  await 
>>> element(by.css('.button-container')).element(by.css('a:nth-child(2)')).click();
>>>
>>>
>>> -- 
>>> 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 ang...@googlegroups.com.
>>> To post to this group, send email to ang...@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] Unable to find Elements with _ngcontent

2019-04-08 Thread Priyanka P
This response is irrelevant.
That doesn't answer my question

On Monday, April 8, 2019 at 10:25:37 PM UTC+10, Dattaram Hodawadekar wrote:
>
>
> https://stackblitz.com/edit/angular-get-el-by-class-name?file=src%2Fapp%2Fapp.component.ts
>  
>  
>
> On Mon, Apr 8, 2019 at 12:34 PM Priyanka P  > wrote:
>
>> Following is the element on page. Im trying to click on the element 
>> specified in yellow below.
>>
>>
>> Following are the ways I tried to identify the element.
>>
>> None of them identify the locator. Please help 
>>
>>
>>1. await element(by.css("a[class*='login']")).click();
>>2. await element(by.linkText('Login')).click();
>>3. await element(by.css("a[class='class="button login transparent 
>> ng-star-inserted']")).click();
>>4. await element(by.css('.button login transparent 
>> ng-star-inserted')).click();
>>5.  await element(by.css('a.button login transparent 
>> ng-star-inserted')).click();
>>6.  await 
>> element(by.css('.button-container')).element(by.css('a:nth-child(2)')).click();
>>
>>
>> -- 
>> 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 ang...@googlegroups.com .
>> To post to this group, send email to ang...@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] Modal window and dynamic content

2019-04-08 Thread Dev C
I need to have dynamic modal window at many places so i need to have
reasonable modal window but the content of the modal should be dynamic , i
heard of having ng-content so can have this as reusable content?

-- 
Sent from my mi note 4 phone.

-- 
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] Angular 6 - Back button press trigger more than once

2019-04-08 Thread shin
I have the following code to detect the back button press using angular 6.

import { Location } from '@angular/common';export class ProductsComponent 
implements OnInit {
constructor( private location: Location){
  this.handleBackButtonPress();}
  handleBackButtonPress() {
this.subscribed = true;
this.location.subscribe(redirect => {
 if (redirect.pop === true) {
  alert('this is a backbutton click');
 }
});
  }}


This is working and we got alert on back button press. The problem is If we 
visit the same page more than once it will trigger the alert with the 
number of time we visited the route with the same component.

-- 
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: retrieving focus after components updated

2019-04-08 Thread Stéphane Ancelot
Hi,

the problem really happens when the whole table databinding is operating :
I slowed down the whole things delaying events to occur.

I memorize focused elem (this.foc) ;

this.sequences = sequences; // this step updates the whole table and triggs 
the angular databing.

I added a 5s timeout to allow table refresh:
setTimeout(_ => {if (this.foc) { console.log("focused ",this.foc);this.foc.
nativeElement.focus();}},5000);

the whole table is nicely updated. but when the timeout occurs, the log 
displays nicely the  component.

but the focus now replies with :
ERROR TypeError: Cannot read property 'focus' of undefined

I suppose this is because the nativelement reference has been removed and 
replaced with a new one after view updates.






 

Le vendredi 5 avril 2019 15:06:36 UTC+2, Stéphane Ancelot a écrit :
>
> Hi,
>
> I have got a list of components organized in table rows.
>
> each time a row is modifed, the data are sent to the backend and returned 
> back to the application with updated fields.
>
> the view is rebuilt with these data and my focus lost.
>
> The problem is that I will have to focus again the field that was selected 
> before the view was rebuilt with the new data.
>
> Regards,
> S.Ancelot
>
>

-- 
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: retrieving focus after components updated

2019-04-08 Thread Sander Elias
Hi Stéphane,

If you blur fires off an action, shouldn't it first check if the field is 
actually updated first?
for myself, I try to stay clear of the blur, as the user interface of it is 
unclear. Especially if it's combined with auto-focus.
Also, when a user just 'tabs' through a form to update something else, it 
will fire, and cause (for the user) unexpected results

Currently working on a sample that does a search in a data-set that's 
updated during the search. Seems a bit similar

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.