[AngularJS] Re: Template Directives and Performance

2017-01-15 Thread Sander Elias
Hi Raven,

Technically, you are right, and the second solution is a tad faster. I 
highly doubt you can even measure the difference, though. At least not with 
at least as a few 1000's of calls on it. Let me explain a little bit, 
change detection has changed a lot from AngularJS to Angular. While in the 
past, there was a digest cycle, and functions like tat would have been 
called up many times, that is not the case anymore.

In Angular, there is no cycle, everything is evaluated just 1 time. So if 
you have ~200 elements, this just adds 200 function calls. That will not 
take that much time, a simple function call usually stays under 1 
nanosecond.
Take this code, and paste it in your console!
(function (){
"use strict";

class test {
constructor() {
this.canSave = true;
this.isUnchanged = false;
this.isSpecial = () => new Date(); // note I return something 
that will change on every iteration!
// I do this so the benchmark won't be optimized by the 
compiler to a noop.
}
setClasses() {
  let classes =  {
saveable: this.canSave,  // true
modified: !this.isUnchanged, // false
special: this.isSpecial, // true
  };
  return classes;
}
}

let myvar = new test();
let someArray = [];
let t0 = performance.now()
let iterations = 20;
for (let x=0; x

[AngularJS] Re: Jsonp issue

2017-01-15 Thread Sander Elias
Hi Andrea,

this means your JSONP response didn't follow the rules about jsonP. It 
probably doesn't follow the callback mechanism that's usually in place.
If you would put the body of your call here, I could take a look, and 
perhaps offer an alternate slolution?

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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: How to track down an uncaught error in rxjs / zone.js?

2017-01-15 Thread Sander Elias
I just found a tip, that might help you a tad. didn't test (yet)

If you're running zone.js 0.7.5, try rolling back to 0.7.4 and trying 
> again.  The error message should be better.


 

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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: How to track down an uncaught error in rxjs / zone.js?

2017-01-15 Thread Sander Elias
Hi Partap,

This is a real issue. If you find a (partial) answer, please share! This is 
also my main gripe with Angular at the moment, that the errors are usually 
completely useless. 

Regards
Sander 

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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 PipeTraform necessary ?

2017-01-15 Thread Sander Elias
Hi Feof,

context? 
The pipeTransform interface is accepting almost anything. It only enforces 
you to have at least 2 parameters, and you must return something. And those 
are mandatory anyway, so can you show us what is giving you the errors?

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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: Learning basics of Angular - example not working

2017-01-15 Thread Sander Elias
Hi W,

If you put script's inside your page, you need to put it inside a script 
tag.  like this:



https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.js";>


  
angular.module('app', []);
angular.module('app').config(['$controllerProvider', function(
$controllerProvider) {
  $controllerProvider.allowGlobals();
}]);
  

  

  
function MessageController() {
  this.message = "This is a model.";
}
  

  
{{controller.message}}
  






The samples that are in the page, are live-editable! So if you want to play 
with them, you can edit them in the book itself. (The book mentions that 
the JS parts are in separately loaded JS files, but glosses a bit over it 
really)
As a side note, while you are still learning, don't use global controllers 
like that. I did read a small part of the book, and it seems to be a bit 
outdated, while it's not wrong what is in there, quite a couple of things 
in there are now looked upon a tad different. If you are done with this 
book, you really want to read the styleguide 
. 

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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] Learning basics of Angular - example not working

2017-01-15 Thread W Smith
Hi everyone, I am using this guide: 
http://www.angularjsbook.com/angular-basics/chapters/controllers/
to learn about controllers and general angular javascript with very basic 
javascript knowledge already. I am putting to this code together apparently 
the wrong way and it is not running and displaying the message as it 
should. Could you please tell me what I am doing wrong?

Here's my code:


https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.js";>



  angular.module('app', []);
  angular.module('app').config(['$controllerProvider', 
function($controllerProvider) {
$controllerProvider.allowGlobals();
  }]);
  

function MessageController() { this.message = "This is a model."; }

{{controller.message}}

-- You received this message because you are subscribed to the Google Groups "Angular" 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] Learning Angular - cant get example working

2017-01-15 Thread W Smith
Hi, I tried posting code but it never showed up my topic. 
http://www.angularjsbook.com/angular-basics/chapters/controllers/ < Im 
using this to learn AJS and I cant get his first example working regarding 
controllers? I have put the code together in a way I understand and nothing 
is showing up.

Where can I post my code to show everyone? I just need to know how to 
structure these commands so that I cant get "This is a model" to show in 
HTML view.

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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: Angular CLI and production build output filename issue

2017-01-15 Thread Thierry Ciot
Thanks.

On Sunday, January 15, 2017 at 10:17:51 AM UTC-5, Sander Elias wrote:
>
> Hi Thierry,
>
> It's in. From beta 25 on you can add:  --output-hashing=none to your 
> build command, and it does exactly what you need!
>
> Regards
> Sander
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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: Angular CLI and production build output filename issue

2017-01-15 Thread Sander Elias
Hi Thierry,

It's in. From beta 25 on you can add:  --output-hashing=none to your build 
command, and it does exactly what you need!

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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: Angular CLI and production build output filename issue

2017-01-15 Thread eddaburleson via Angular


On Sun, 1/15/17, reginemcfarlane via Angular  wrote:

 Subject: Re: [AngularJS] Re: Angular CLI and production build output filename 
issue
 To: angular@googlegroups.com
 Date: Sunday, January 15, 2017, 1:08 PM
 
 
 
 On Sun, 1/15/17, Sander Elias 
 wrote:
 
  Subject: Re: [AngularJS] Re: Angular CLI and production
 build output filename issue
  To: "Angular" 
  Date: Sunday, January 15, 2017, 11:25 AM
  
  Done!,
  I'll
  let you know the result when there is one!
  RegardsSander
  
  On Saturday, January 14, 2017
  at 11:54:47 PM UTC+1, Thierry Ciot wrote:Yes that would
  be great.
  Thanks.
  
  On Sat, Jan 14, 2017 at
  12:59 AM, Sander Elias 
 wrote:
  Hi Thierry,
  I can open an issue for this if you
  want?
  RegardsSander
  
  
  
  -- 
  
  You received this message because you are subscribed to a
  topic in the Google Groups "Angular" group.
  
  To unsubscribe from this topic, visit https://groups.google.com/d/
  topic/angular/TPloz8WXuvc/ unsubscribe.
  
  To unsubscribe from this group and all its topics, send an
  email to angular+u...@
  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" 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.
  narea in circuitul pietei a mosiilor nobiliare 
 boieresti si manastiresti  ca si a
 
 -- 
 You received this message because you are subscribed to the
 Google Groups "Angular" 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.
 u toate imperfectiunile care rezultau din politica de forta si dictat  
tratatele semnate cu tara noastra in anii 1919-1920 au reprezentat 
recunoasterea internationala a statului unitar roman  oferindu-i teoretic si 
garantiile necesare pentru mentinerea si consolidarea sa.

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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: Angular CLI and production build output filename issue

2017-01-15 Thread reginemcfarlane via Angular


On Sun, 1/15/17, Sander Elias  wrote:

 Subject: Re: [AngularJS] Re: Angular CLI and production build output filename 
issue
 To: "Angular" 
 Date: Sunday, January 15, 2017, 11:25 AM
 
 Done!,
 I'll
 let you know the result when there is one!
 RegardsSander
 
 On Saturday, January 14, 2017
 at 11:54:47 PM UTC+1, Thierry Ciot wrote:Yes that would
 be great.
 Thanks.
 
 On Sat, Jan 14, 2017 at
 12:59 AM, Sander Elias  wrote:
 Hi Thierry,
 I can open an issue for this if you
 want?
 RegardsSander
 
 
 
 -- 
 
 You received this message because you are subscribed to a
 topic in the Google Groups "Angular" group.
 
 To unsubscribe from this topic, visit https://groups.google.com/d/
 topic/angular/TPloz8WXuvc/ unsubscribe.
 
 To unsubscribe from this group and all its topics, send an
 email to angular+u...@
 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" 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.
 narea in circuitul pietei a mosiilor nobiliare  boieresti si manastiresti  ca 
si a

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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: Angular CLI and production build output filename issue

2017-01-15 Thread floydjack428 via Angular


On Sun, 1/15/17, Sander Elias  wrote:

 Subject: Re: [AngularJS] Re: Angular CLI and production build output filename 
issue
 To: "Angular" 
 Date: Sunday, January 15, 2017, 11:25 AM
 
 Done!,
 I'll
 let you know the result when there is one!
 RegardsSander
 
 On Saturday, January 14, 2017
 at 11:54:47 PM UTC+1, Thierry Ciot wrote:Yes that would
 be great.
 Thanks.
 
 On Sat, Jan 14, 2017 at
 12:59 AM, Sander Elias  wrote:
 Hi Thierry,
 I can open an issue for this if you
 want?
 RegardsSander
 
 
 
 -- 
 
 You received this message because you are subscribed to a
 topic in the Google Groups "Angular" group.
 
 To unsubscribe from this topic, visit https://groups.google.com/d/
 topic/angular/TPloz8WXuvc/ unsubscribe.
 
 To unsubscribe from this group and all its topics, send an
 email to angular+u...@
 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" 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.
 a   Confederativa   din   Moldova e comisul Leonte Radu. - Constituirea de 
catre studentii ati la studii la Paris a Societatii atatura poporului roman 
.1839- Olanda recunoaste independenta Belgiei - Agitatii republicane la Paris. 
1839-1842-Razboi intre India si Afganistan. 1839-1851-Razboiintre
Argentinasi Uruguay.

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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: Library to implement next word prediction in front-end

2017-01-15 Thread Sander Elias
Hi Methusela,


Done some research. Most approaches are dependent on a larger dataset of 
words. This alone makes it less suited for an implementation in the browser.
What you can do is use WebSocket to communicate with your backend, and do 
the prediction there.  If you don't want to host such a thing yourself, 
there is, for example, the google prediction API. (MS and AWS and other 
will have similar offerings) Those usually use a rest interface, that makes 
it a bit more of a chore to interface with it.

Hope this helps you a bit,
Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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: Angular CLI and production build output filename issue

2017-01-15 Thread Sander Elias
Done!,

I'll let you know the result when there is one!

Regards
Sander

On Saturday, January 14, 2017 at 11:54:47 PM UTC+1, Thierry Ciot wrote:
>
> Yes that would be great.
> Thanks.
>
> On Sat, Jan 14, 2017 at 12:59 AM, Sander Elias  > wrote:
>
>> Hi Thierry,
>>
>> I can open an issue for this if you want?
>>
>> Regards
>> Sander
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Angular" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/angular/TPloz8WXuvc/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> angular+u...@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" 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.