[AngularJS] storing a max value in a component

2017-08-03 Thread Stéphane Ancelot
Hi,

I have a cusror slider component that must display only the max value he got

it is declared using databinding :
https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] formatting decimal numbers without displaying thousand comma

2017-08-04 Thread Stéphane Ancelot
hi,

I used pipe to format number display as  follow :

{{ myval | number : '1.1-3' }}

this works but for numbers > 1000, there are displayed like this :


-- 
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: storing a max value in a component

2017-08-04 Thread Stéphane Ancelot
Thanks, I did knew this method however I managed to solve the problem 
ussing setter/getter :

private  _cursorvalue:number;


@Output()
  cursorvalueChange: EventEmitter = new EventEmitter(); 
@Input()  set cursorvalue(v:number){
  if (v > this._cursorvalue) 
   {
   this._cursorvalue = v; 
   this.cursorvalueChange.emit(this._cursorvalue);
  }
  }
get cursorvalue() {
return this._cursorvalue;
}




Le jeudi 3 août 2017 17:28:44 UTC+2, Stéphane Ancelot a écrit :
>
> Hi,
>
> I have a cusror slider component that must display only the max value he 
> got
>
> it is declared using databinding :
> https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Is there a way to use svg iframe in angular4

2017-07-12 Thread Stéphane Ancelot
after some readings, using an iframe to access svg dom would be a very bad 
thing regarding angular .
I want to manipulate svg dom too (mainly using databinding...) .  That 
begins to sound  complicated...  So, the better way would be to inline svg 
in my component .

But the inconvenient is that my svg file is dependent of my code and not 
easily editable with graphic editor in this case. 
So, an idea would be to "copy" the svg file content in the component code 
at compile time (svg will be a code fragment).

svg file + component template => final_component.ts => compilation => js 
code 

Now , the question is which way doing that ??? 

-- 
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: Is there a way to use svg iframe in angular4

2017-07-11 Thread Stéphane Ancelot
I may have badly formatted my question .

I want to acces an svg file embedded in a regular iframe  (classic !) 



Le lundi 10 juillet 2017 14:59:43 UTC+2, Stéphane Ancelot a écrit :
>
> Hi,
> I was wondering which is the right way to embed an svg iframe file in 
> order to manipulate it's dom ?
>
> Regards,
> Steph
>
>

-- 
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: Is there a way to use svg iframe in angular4

2017-07-12 Thread Stéphane Ancelot
my svg file will be "dynamic" , eg modifiying a circle radius with bindings 
to an html input .

I  have directly used the svg file as templateUrl in my component. 

but it has not displayed. a text is displayed instead "
zigzag.c1077c2dbf8b9b8aa2e9.svg"

I found  I had to use the sanitizer to enable SVG, since svg is not 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: Is there a way to use svg iframe in angular4

2017-07-12 Thread Stéphane Ancelot


> I have not found any enableSvg() func in sanitizer, I suppose it was for 
> angular v1.
>
 
Maybe the problem comes from webpack loader that does not load the file ?. 
I have seen there was svg-url-loader : 
https://github.com/bhovhannes/svg-url-loader

-- 
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: using javascript math in a component

2017-07-18 Thread Stéphane Ancelot
Next lines solved the problem in the component :

 Math: any;

  
  constructor() {
this.Math = Math;
  }


Le mardi 18 juillet 2017 10:27:58 UTC+2, Stéphane Ancelot a écrit :
>
> Hi,
> It looks like I need to declare something in order being able to use  Math 
> functions in a component html (cos, sin...) ?
>
>
>
> OutilsvgComponent.html:22 ERROR TypeError: Cannot read property 'cos' of 
> undefined at Object.eval [as updateRenderer] (OutilsvgComponent.html:23) 
> at Object.debugUpdateRenderer [as updateRenderer] (core.es5.js:13094) at 
> checkAndUpdateView (core.es5.js:12241) at callViewAction (
> core.es5.js:12601) at execComponentViewsAction (core.es5.js:12533) at 
> checkAndUpdateView (core.es5.js:12242) at callViewAction (
> core.es5.js:12601) at execComponentViewsAction (core.es5.js:12533) at 
> checkAndUpdateView (core.es5.js:12242) at callWithDebugContext (
> core.es5.js:13456)
>
> Regards,
> Steph
>

-- 
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 there a way to use svg iframe in angular4

2017-07-10 Thread Stéphane Ancelot
Hi,
I was wondering which is the right way to embed an svg iframe file in order 
to manipulate it's dom ?

Regards,
Steph

-- 
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: Looking for a date picker control

2017-07-10 Thread Stéphane Ancelot
https://material.angular.io/components/datepicker/overview


Le jeudi 6 juillet 2017 23:15:01 UTC+2, Reza Razavipour a écrit :
>
> I have attached a screen shot of what I need.
>
> Anyone knows of one and recommends it? 
> I am using Angular4 and SystemJS.
>

-- 
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 use webpack node loader in angular

2017-07-25 Thread Stéphane Ancelot
Hi,
I would like to use shared libs using node-loader in angular.

my lib is stored in build/Release/control.node file

I do not manage to import it in angular

Regards,
steph

-- 
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: Angular 4 render html at runtime

2017-07-26 Thread Stéphane Ancelot
It sounds to me like adding a new component in which your template is 
defined.

  let factory = 
this.componentFactoryResolver.resolveComponentFactory(MyNewcomponent);
  let x = this.cardtempbase.createComponent(factory);

your constructor :
// `ViewContainerRef` from the component itself
  constructor(private viewContainerRef:ViewContainerRef, private 
componentFactoryResolver: ComponentFactoryResolver) {}


in order to work, MyNewComponent must be declared in NgModule 
(app.module.ts)
entryComponents : [ MyNewComponent ],

Le mardi 18 juillet 2017 18:48:42 UTC+2, Chuck James a écrit :
>
> Hi All,
>
>  I am appending 'template html' to a base div. And then try to access this 
> template with variable. but it throwing the error as it's  added 'template 
> html' to DOM but not rendered it to assign the variable to angular eco 
> system. So is there a way to render it, like some renderer API or something 
> to render the string and assign angular (#id) references to angular. 
>
> some code would be easier to understand:
>
>
> @ViewChild('#cardtempbase', { read: ViewContainerRef }) cardtempbase;
> const tempalteDiv = ' ';
> this.base.nativeElement.insertAdjacentHTML('afterbegin', tempalteDiv);
> this.cardtempbase.clear(); // this is throwing as cardtempbase not 
> defined.
> this.cardtempbase.createComponent(factory); this is throwing as cardtempbase 
> not defined.
>
>
>
> let me know if there is any confusion. 
>
> Thanks,
> Chuck
>

-- 
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] periodic refresh using xml http get request

2017-07-26 Thread Stéphane Ancelot
Hi,

I have a view that will need to refresh some data on display every 300ms.

I will get these data with an xml http get request.

what sounds to be the best method to do the refresh loop (getting data and 
refresh ?) .

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] accessing model data from some components

2017-07-19 Thread Stéphane Ancelot
Hi,
I may have misunderstood the concept of model.

I have 2 components : 

c1 : is a form panel with data in ngModel , data are stored in a model 
class.

c2 : need to use data from c1 component.

I am unable to access data in model from c2.

please can you provide me with some tips/examples.

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: accessing model data from some components

2017-07-24 Thread Stéphane Ancelot
I submitted an answer working here 
: 
https://stackoverflow.com/questions/31026886/how-do-i-share-data-between-components-in-angular2/45274521#45274521


Le mercredi 19 juillet 2017 11:45:27 UTC+2, Stéphane Ancelot a écrit :
>
> Hi,
> I may have misunderstood the concept of model.
>
> I have 2 components : 
>
> c1 : is a form panel with data in ngModel , data are stored in a model 
> class.
>
> c2 : need to use data from c1 component.
>
> I am unable to access data in model from c2.
>
> please can you provide me with some tips/examples.
>
> 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: Is there a way to use svg iframe in angular4

2017-07-12 Thread Stéphane Ancelot


> hum... 
>

I copy my svg file in outilsvg.component.html  , that works
@Component({
 selector: 'app-outilsvg',
 templateUrl: './outilsvg.component.html',
}) 



I rename outilsvg.component.html to zigzag.svg  it does not work ...altough 
the ocntent is the same as previous file...
@Component({
 selector: 'app-outilsvg',
 templateUrl: './zigzag.svg',
}) 




I had to specify  next command in NgModule, to bypass rdf tags in svg file
 schemas:  [ NO_ERRORS_SCHEMA ],

This is not very convenient copying svg file in an html one ...

I have to strip the xml tag from svg file too 

-- 
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: formatting decimal numbers without displaying thousand comma

2017-08-04 Thread Stéphane Ancelot


Le vendredi 4 août 2017 08:47:28 UTC+2, Stéphane Ancelot a écrit :
>
> hi,
>
> I used pipe to format number display as  follow :
>
> {{ myval | number : '1.1-3' }}
>
> this works but for numbers > 1000, there are displayed like this :
>
> 12,345
>

-- 
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: Share data between components using TranslateService in Angular 4+

2017-09-20 Thread Stéphane Ancelot
hi!

Have you succed ? because I have got a problem using the TranslateService.
I made a language-picker component that is a child of the app. 
When it modifies the translate language, it does not change the whole app 
language.
I don't know if it is a refresh problem . or if the TranslateService is not 
defined as singleton.



Le vendredi 18 août 2017 11:31:17 UTC+2, becto...@gmail.com a écrit :
>
> if i am using the translate service in angular4+
>
> Can i share data between components just importing this 
> translateService. Pretty much I want that service to remember which 
> language I set it to. Or is this something i need to create my own service 
> for to share the language i set my app to in order to get it in between 
> components. 
> import { TranslateService } from '@ngx-translate/core';
>
>
>  constructor(public translate: TranslateService, public data: DataService) 
> {
>this.data = data;
>translate.addLangs(['en', 'fr']);
>const browserLang: string = translate.getBrowserLang();
>translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
>
> }
>
>
>
>
>
> how could I then in another component figure out which 
> languauge translate.use() was already set to? Or can the translateService 
> not persist data between components and i would have to use the DataService 
> that i wrote myself to store it?
>
> Thanks 
>

-- 
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: Share data between components using TranslateService in Angular 4+

2017-09-20 Thread Stéphane Ancelot
I made further checks in my application.
The language picker changes selection language.
The service is singleton, if I change pages, and request translation using 
the next code, the translation is well reported.
However, the application does NOT refresh. how to trig a refresh ?? 
I displayed some translations in the language picker, itself, it does not 
refresh altough language is changed.
Is it because it uses translation pipe in the messages that are not 
refreshed ... ?

 
this.translate.get('my text').subscribe(
  value => {
  console.log("translated :");
  console.log(value);
  }




Le vendredi 18 août 2017 11:31:17 UTC+2, becto...@gmail.com a écrit :
>
> if i am using the translate service in angular4+
>
> Can i share data between components just importing this 
> translateService. Pretty much I want that service to remember which 
> language I set it to. Or is this something i need to create my own service 
> for to share the language i set my app to in order to get it in between 
> components. 
> import { TranslateService } from '@ngx-translate/core';
>
>
>  constructor(public translate: TranslateService, public data: DataService) 
> {
>this.data = data;
>translate.addLangs(['en', 'fr']);
>const browserLang: string = translate.getBrowserLang();
>translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
>
> }
>
>
>
>
>
> how could I then in another component figure out which 
> languauge translate.use() was already set to? Or can the translateService 
> not persist data between components and i would have to use the DataService 
> that i wrote myself to store it?
>
> Thanks 
>

-- 
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] accessing child elements in directive impossible

2017-10-10 Thread Stéphane Ancelot
Hi, 
I would like to setup an onreturndirective to give focus to next field.

I may have missed something, but I think the renderer2 lacks of some 
functions to access child components, I can not focus next element because 
it is inside a div.

I made a plunker of my app:
http://plnkr.co/edit/Ra5jVkSV3pCFA0aJLrMz?p=preview

Regards,
Steph

-- 
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: server side rendering discussion

2018-09-04 Thread Stéphane Ancelot


Le mardi 4 septembre 2018 17:40:07 UTC+2, Sander Elias a écrit :
>
> Hi Steph,
>
> Angulars SSR is primarily aimed at speeding up first-page load, as you 
> have figured out. There are ways around this. Still, if you really need 
> Server-Side pages, it might be easier to resolve without angular. 
> If you want to include angular, you might be interested in this 
> . 
>
>
Resolve it without angular... this may be an option. I am calling an api 
that generates the html / js page on the server side 

However, this part of the view would need being embedded as an angular 
component in angular project.

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

2018-10-24 Thread Stéphane Ancelot
Hi, I have got some fonctions that returns different kind of data on a web 
server 

basically , imagine http://localhost/data1 returns a set of json data and 
http://localhost/data2 returns a different kind of json data.

Regarding service implementation, do I have to setup a service for access 
of each kind of data ? or a single service that manages many kind of json 
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] using bootstrap studio

2018-11-07 Thread Stéphane Ancelot
Hi,
I am thinking about using bootstrap studio to design my page layouts and 
then integrating them in angular

I would like if somebody  already does it.

is it easy , or I may loose it if it is a bad idea ?

Regards,
Steph

-- 
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 projects promoting

2018-11-06 Thread Stéphane Ancelot
Hi,

I have got to defend my vision of angular in front of c++ developers that 
want to promote QT applications .

This is very difficult for myself to promote angular , I have always the 
next arguments facing :
This is not a well known technology.
There is no real applications existing ! 
Who uses it ?

I have to defend applications that must be able to run on 7/17/19 inches 
screen . It is easy to args it is battery included at design, but I always 
need to justify :-( ...

I personally think that angular permits RAD development process. with a 
minimal set of graphic components (input, button, div ) 

If you have got some useful arguments or presentations to fight these guys 
arguments ...
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: Angular with jQuery -> Issue

2018-09-04 Thread Stéphane Ancelot
JQuery and angular are two kinds of technology I would never mix.
You should consider JQuery deprecated.

Le mercredi 29 août 2018 16:46:48 UTC+2, Felipe 0liveira a écrit :
>
> Hey guys, what's going on?
>
> I have a Angular 5 project which imports on index.html my modified jQuery 
> lib from my repository! It's in a script:src's tag on index.html:
>
> 
> 
>
> 
>  
>  My Application
>
>   
>  
>  
>
>   https://myrepo/css/animate.min.css;>
>  https://myrepo/css/bootstrap-theme.css;>
>  https://myrepo/css/bootstrap.min.css;>
>  
>  
> 
>
> 
>  
>
>   https://myrepo/js/jquery.min.js";>
>  https://myrepo/js/popper.min.js";>
>  https://myrepo/js/bootstrap.min.js";>
> 
>
> 
>
>
> I'm using at this way because I can't import a script on .angular-cli.json 
> file by a link, right?
>
> To work with jQuery on Angular I just needed to add:
> declare var $: any;
> at the top of the component that I want to use jQuery!
>
> *Bt*, when I run the angular unit test script ng test, I get 
> several errors because jQuery is not know!
> Then I installed jQuery from NPM in the project and I have imported to 
> project scripts and Success! The test Run!
>
> *BUT *all jQuery functions in application stop working!
>
> DA!
>
> What do I have to do?
>

-- 
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] server side rendering discussion

2018-09-04 Thread Stéphane Ancelot
Hi,

I have an embedded system on which I want to design an gui to edit some 
system data , that are available through a C api. (direct access may be 
available thanks to a swig javascript c++ native node)

I was thinking at first about server side rendering.
Server side rendering would permit to access directly system data to 
display them in the rendered html page using the c++ native node access 
(Right ?) , thing that is not possible directly using client side rendering.

The other classic solution would be using an api that permits to retrive 
system json data  through http web service and send back edited data to 
this api.


However, after looking a bit deeper in server side rendering, I understood 
that editing data may be complicated ? or need to switch to browser 
interface ?

So, I am here a bit loss.  It is not really clear if a "full" server side 
rendering application is possible or not, I understood it is mainly used to 
speed up first page loading , to permit seo crawler, but a real 
application?.
In my case I think server side rendering would permit lot of things and a 
quick approch.

What do you thing guys ?

Regards,
Steph



-- 
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: Angular i18 internationalization, I don't see translated text! :-(

2018-11-27 Thread Stéphane Ancelot
>From my viewpoint, I prefer using gettext po loader 

Le mardi 27 novembre 2018 13:58:36 UTC+1, Archimede a écrit :
>
> Hi all!
>
> in order to translate my Angular 6 page and in according with this 
> tutorial https://angular.io/guide/i18n I done the following simple 
> operations but I don't see any translated texy. Why? Thank you very much!
>
>
> 1) Translation definitions. In the new folder src/locale I created the 
> files messages.en.xlf and messages.it.xlf, with the following code 
> (obviously it changes the target for each language):
>
> 
>   placeholder
>bye bye (it-IT)
>   An introduction header for this 
> sample
>   User welcome
>   bye bye
> 
>
>
> 2) Tag definition. In my html page I insert the following tag, with a 
> placeholder:
>
> 
> placeholder
> 
>
>
> 3) In angular.json file, I insert the following rows:
>
> "architect": {
> "build": {
>   "builder": "@angular-devkit/build-angular:browser",
>   "options": {
> "outputPath": "dist/mobile-client",
> "index": "src/index.html",
> "main": "src/main.ts",
> "polyfills": "src/polyfills.ts",
> "tsConfig": "src/tsconfig.app.json",
> "i18nFile": "src/locale/messages.it.xlf", //This
> "i18nLocale": "it",   //This
> "i18nFormat": "xlf",  // This
> "assets": [
> (...)
>
>
> Then I tried to build and serve but I don't see the translated text "bye 
> bye". How can I solve it? Thank you very much!
>

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

2018-11-30 Thread Stéphane Ancelot
Hi,

This may be offtopic, but I am planning seeking for a job in Toronto (maybe 
another country if interesting job).
what can I expect as an angular developper ?

you can email me: sancelo...@gmail.com

Thanks.
Regards

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

2018-11-26 Thread Stéphane Ancelot
Hi,
I want to design a custom svg slider .

The problem is that I don't really know from where to start to implement 
drag.

I have seen some snippets with rxjs 

https://varun.ca/drag-with-rxjs/


help is welcomed.

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] blur in forms

2019-01-28 Thread Stéphane Ancelot
Hi I don't manage to use blur in angular 6.2 forms, what can be wrong ??



  
  

  

Regards,
Steph

-- 
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] dispatching enter event

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

I am trying to implement ecel like navigation with a directive.

I am not able to propagate an enter event when keydown is pressed . 
What is the prefered way ?

@HostListener('keydown.arrowup', ['$event'])
@HostListener('keydown.arrowdown', ['$event'])
@HostListener('keydown.arrowright', ['$event'])
@HostListener('keydown.arrowleft', ['$event'])
onkeydown(event : KeyboardEvent)
{
let right = 39;
let down = 40;
//event.stopPropagation();
//event.preventDefault();
if (event.keyCode == 40)
{
let k = new KeyboardEvent('keydown',{"key":"Enter"});
this.el.nativeElement.dispatchEvent(k);
}
}


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

2019-04-05 Thread Stéphane Ancelot
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
Yes, but unfortunately, it does not.
When focus is lost, (blur)  component func is called, this func sends new 
data to server.
The parent component table, will then receive a new sequence of all the 
lines of the table and update it .


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


Re: [AngularJS] Re: adding dynamically components to svg view

2019-03-18 Thread Stéphane Ancelot
This solves my problem at the moment. But the idea was to keep the
application composant oriented.

I was following this issue
https://github.com/angular/angular-cli/issues/10567#issuecomment-449568450

But I don't know if it will solve it.


Le ven. 15 mars 2019 à 21:12, Sander Elias  a écrit :

> Question,
>
> Can you solve your issue like this:
> https://stackblitz.com/edit/angular-eydtvf?file=src%2Fapp%2Fapp.component.ts
>
> --
> 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/0U1Mwi5HBMk/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.
>

-- 
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: Adding a timed flash error message and also a popup message

2019-03-19 Thread Stéphane Ancelot
I think you are looking for  toaster 

Le vendredi 15 mars 2019 07:12:55 UTC+1, P.Suresh Kumar a écrit :
>
> I'm working on a form in angularjs, asp.net and mysql server. My 
> requirement is to display a flashing error message when add button is 
> pressed without entering any input in the form fields as well as when I 
> click the delete icon, it must be displaying a popup message like "Are you 
> sure you want to delete?", If I press OK, it must be again displaying a 
> popup message "Deleted successfully". I have attached my code below.
>
> index.aspx
> -
> <%@ Page Language="C#" AutoEventWireup="true" CodeFile="editv1.aspx.cs" 
> Inherits="edit" %>
>
> 
> http://www.w3.org/1999/xhtml;>
> 
> https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
> ">
> https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css; />
> https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css;
>  
> />
> https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.5/angular.js
> ">
> 
> var app = angular.module('MyApp', []);
> app.controller('MyController', function ($scope, $http, $window) {
> $scope.ButtonText = "Add";
> GetCustomers($scope);
> $scope.Add = function () {
> var obj = {};
> obj.id = $scope.Id == undefined ? 0 : $scope.Id;
> obj.name = $scope.Name;
> obj.country = $scope.Country;
> $.ajax({
> url: 'edit.aspx/AddUpdateCustomer',
> type: 'POST',
> contentType: 'application/json',
> data: JSON.stringify(obj),
> success: function (response) {
> GetCustomers($scope);
> },
> error: function (err) {
> alert(response.responseText);
> }
> });
> }
> $scope.Delete = function (id, $confirm) {   
> var obj = {};
> obj.id = id;
> $.ajax({
> url: 'edit.aspx/DeleteCustomer',
> type: "POST",
> contentType: 'application/json',
> data: JSON.stringify(obj),
> success: function (response) {
> GetCustomers($scope);
> },
> error: function (err) {
> alert(response.responseText);
> }
> });
> }
> $scope.Edit = function (id) {
> var customers = $scope.Customers;
> customers.map(function (customer) {
> if (customer.Id == id) {
> $scope.Id = customer.Id;
> $scope.Name = customer.Name;
> $scope.Country = customer.Country;
> $scope.ButtonText = "Update";
> }
> });
> }
> });
> function GetCustomers($scope) {
> $.ajax({
> url: 'edit.aspx/GetCustomers',
> type: "POST",
> contentType: 'application/json',
> success: function (response) {
> $scope.Customers = response.d;
> $scope.$apply();
> },
> error: function (err) {
> alert(response.responseText);
> }
> });
> }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Name
> 
> 
>  class="form-control" name="name" ng-model="Name" required/>
>  ng-messages='form.$submitted.$error' ng-if='form.name.$dirty'>
> Required field
> 
> 
> 
> 
> Country
> 
>  class="form-control" name="country" ng-model="Country" required/>  
>
>  
> 
> 
> 
>  class="btn btn-primary" ng-click="Add()">{{ButtonText}}
> 
> 
> 
> 
> 
> 
> 
> 
> 
>

[AngularJS] is there a way to compute expression in template ?

2019-03-19 Thread Stéphane Ancelot

Hi, 
Is there an easy way to compute expression in the template in order to 
assign this kind of attribute :

[attr.transform]="translate({{item.graphe_x}},0)"

-- 
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: is there a way to compute expression in template ?

2019-03-19 Thread Stéphane Ancelot
... I found a way using a function :

[attr.transform] = "getTransform(item.graphe_x,0)"

Le mardi 19 mars 2019 09:51:17 UTC+1, Stéphane Ancelot a écrit :
>
>
> Hi, 
> Is there an easy way to compute expression in the template in order to 
> assign this kind of attribute :
>
> [attr.transform]="translate({{item.graphe_x}},0)"
>

-- 
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] adding dynamically components to svg view

2019-03-15 Thread Stéphane Ancelot
Hi,

I am adding components to an svg view, but for some UNKNOWN reasons  they
 are not added INSIDE the svg component but after it (see screenshot)

html template :












code 

@ViewChild('mysvg',{read: ViewContainerRef}) mysvgcontainer:ViewContainerRef
;


ngAfterContentInit() {
let gantt_bar = this._cr.resolveComponentFactory(GanttBarComponent);
for (let n=0;n < this.sequences.length;n++)
{
console.log("create new component",n);
let componentref = this.mysvgcontainer.createComponent(gantt_bar);
(componentref.instance).y = 10*n;
}
}

-- 
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] templating a table row as component

2019-01-29 Thread Stéphane Ancelot

Hi, 
Is there a way to use a component as row i n a table ?? the next code does 
not work






   

 Liste


Mouvement {{listId}} {{editId}}
course
Accel
Vitesse
Decel
temps
Edit
Delete
   





 



 
 
 


Regards,
Steph

-- 
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: templating a table row as component

2019-01-29 Thread Stéphane Ancelot

Sorry, I corrected the code was wrong...
Le mardi 29 janvier 2019 16:13:48 UTC+1, Stéphane Ancelot a écrit :
>
>
> Hi, 
> Is there a way to use a component as row i n a table ?? the next code does 
> not work
>
>
>
>
> 
> 
>
> 
>  Liste
> 
> 
> Mouvement {{listId}} {{editId}}
> course
> Accel
> Vitesse
> Decel
> temps
> Edit
> Delete
>
> 
> 
> 
> 
>  
>  
>  
>
>
> Regards,
> Steph
>

-- 
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 ElementRef within an event handler

2019-02-05 Thread Stéphane Ancelot
I finally ended as follow :


since this keyword can not be accessible to access component class methods 
from the event handler, I had to keep  a reference to it .

const reference = this;
xstart : number;


  function dragstarted(d)
  {
.. reference.xstart = d3.event.x;
 }



d3... .on("start",dragstarted)



Le vendredi 1 février 2019 16:29:49 UTC+1, Stéphane Ancelot a écrit :
>
> Hi,
> I have got to implement drag and drop in a svg d3js component.
>
> the svg elements are created dynamically . 
>
> I want to retrieve the transform attribute of the dragged element in the 
> drag handler.
>
> This would mean, I would need ElementRef of these dynamically allocated 
> element.
>
> I suppose , the solution needs ViewChildren ,  but I don't know how to 
> implement it.
>
> The elements are created using the following code :
>  this.g = this.svg.selectAll(".dimension")
> .data(dimensions)
> .enter().append("g")
> .attr("class", "dimension")
>
> .attr("transform", function(d) { return "translate(0," + _this.y(d
> .id) + ")"; })
>
> Regards
>

-- 
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-09 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-09 Thread Stéphane Ancelot
I finallyt solved the problem using a trackBy function associated to ngFor.
This trackby function always returns the same Value. 
Thus, the DOM is never scratched and only the values of my fields on the 
screen updated.
This seems being working when I add a line at end, a new line is created



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

2019-04-09 Thread Stéphane Ancelot
No, that does not work really

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.