On Wednesday, February 3, 2016 at 12:59:34 PM UTC-8, Timmy Huang wrote:
>
>
> I think they both achieve the same result!
>
Yes, they do.
> However, IIFE approach seems to make the code look cleaner, because, for
> example, you have long list of injectors:
>
>
I'm looking for some community feedback on the topic of SEFs/IIFEs and
Angular 1.2x. Some things I have read seem to lean heavily on the side of
using them everywhere, no matter what, if you are writing JavaScript. In
jQuery I feel this was true, as well as for raw JS, but I just don't see
the
Use JSONP. This is the best guide I found on how to do
it: http://oscargodson.com/posts/unmasking-jsonp.html. It helped me
understand what needed to be done.
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this group and stop
Here's what Angular says about
it: https://docs.angularjs.org/api/ng/service/$http#jsonp
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Your $resource usage should be in a factory/service, so you can declare it
globally within that service, or you can put it into another service that
houses your utility functions/variables and inject that into your other
services.
--
You received this message because you are subscribed to the
There is a Timeout option in the $http specs. You pass it in your config.
- timeout – {number|Promise} – timeout in milliseconds, or promise
https://docs.angularjs.org/api/ng/service/$q that should abort the
request when resolved.
--
You received this message because you are
At one time the default timeout for http requests was 30 seconds, but now
many browsers perform keep-alive polling by default so in all
practicality there isn't one. I've had http requests sit for several
minutes before the server itself finally gave up and issued a timeout.
--
You received
Speaking strictly for myself, if the job involves Angular I don't mind.
Everything else I routinely mark as SPAM.
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
There are any number of directives to be found that disable the button as
soon as it is clicked.
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
First, Protractor does not recommend running tests in IE because of slowness
and timeouts http://angular.github.io/protractor/#/browser-setup. Now,
considering this, my first question is are you sure that the button is
enabled at the time that the click fires? I ask this because locating by id
What I described is used primarily for debugging or while writing new tests
against existing code and you don't want to run the tests for the whole
app. If you want to run just one test, isolate it in a single suite and
call just that suite from Protractor (information
here:
If you are using Jasmine 2 you can use iit to tell Jasmine that you just
want that one test run. Similarly, using ddescribe will tell it to run
just that one suite. Just remember to take them out as soon as you are done
so that the rest of your tests will run normally.
--
You received this
Yes, we are aware of that. We did it this way so that we could do any other
processing that we needed to the data before it is sent back. I should have
explained that, sorry.
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this
Hmm... you do make a valid point. The only argument that I could even try
to put up would be readability, and even that is a weak one. I'll have to
look at doing it that way and see where else we can make improvements.
Thanks Kyle.
--
You received this message because you are subscribed to
I can't speak for the OP, but we abstracted the inner workings of the
$resource away by putting them into a service and wrapping every resource
call in $q. Something like this:
function doSomething(){
var defObj = $q.defer();
var Promise = myResource.query();
FWIW, I would go with Protractor. Like you said, it's really tailored to
Angular projects. Protractor fits into automation schemes well, and there
are coverage packages out there for it. You can automate it all with
Grunt/Gulp.
I should also mention that I've never heard of The Intern Project
Just for clarity, the Intern website is http://theintern.io/
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email
to angular+unsubscr...@googlegroups.com.
To post to this
Simple Google search for protractor requirejs
http://stackoverflow.com/questions/25596706/using-protractor-test-with-bootstrapped-angularjs
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this group and stop receiving emails
Google is your
friend:
http://www.yearofmoo.com/2013/01/full-spectrum-testing-with-angularjs-and-karma.html
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Well, first you have to define what you think too many is. Also, how much
data are you transmitting each direction? Under 100k and yes, you are being
too paranoid IMO. More than 100k and less than 1M isn't really a lot
either, but I don't know the conditions that you are running under. Also,
FWIW, when I first learned BASIC in high school we did not have screens. It
was all done on teletype-like terminals that saved your program on paper
tape. After that I bought an Atari 800XL and really thought I was stylin!
--
You received this message because you are subscribed to the Google
Answered on SO.
--
You received this message because you are subscribed to the Google Groups
AngularJS 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.
Look
here:
http://gitelephant.cypresslab.net/angular-js/commit/82213efff23a71ca37e1a99c11ef6bc49b1af1eb
Seems to work for me. I only have 45 tests (so far) and it shaved 7 seconds
off of the run time.
--
You received this message because you are subscribed to the Google Groups
AngularJS
Duplicate
of https://groups.google.com/forum/?fromgroups#!topic/angular/bwDfTYmagAM
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
{data: {foo: 'baz bar'}}
is not the same as
data: {foo: 'baz bar'}
The difference is that you have the first one wrapped in an extra set of
{}s, which tells $http that that is what you want to send for the data. If
you did $http({url: url, method: 'PUT', {data: {foo: 'baz bar'}}})
As a brief follow-up to my OP which has been since hi-jacked, we let
Protractor sit and age for a while, and like a good wine it only got
better. We picked it up last week and everything is going very well now. It
worked right out of the box for us and the addition of page objects is the
icing
I don't see why it couldn't be. Karma is able to be used for any JS unit
testing, so that may be a help as well.
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
For whatever reason, protractor seems to be doing something to Jasmine so
that calls to something like jasmine.x do not work right. To get around it,
you need to call it like: this.x instead. In your case, this.addMatchers().
--
You received this message because you are subscribed to the
Let me preface this by saying that I do not work at Google, nor am I a
person who contributes code to the Angular project. Should any of those
people have a differing opinion or better information, I would be very
willing to listen.
That being said, we were having a similar problem at my
First, you don't need to put jQuery in your directives for things like
changing classes. Binding to (scope, element, attributes) in the link
function should give you access to everything you need for most situations.
The element argument is a direct binding to the element that the
directive
Unit tests focus on a specific piece of code and make sure that it does
what it is supposed to (like checking a calculation.) What you are talking
about in checking that the form is completed borders on an End-2-End test,
which tests the functionality of the app in a more user-like manner (fill
With $resource you can pre-define the URL for your factory/service to use
(including variables) as well as the HTTP verbs that each will use:
var addressTypesAPI = '/v1/rest/addresstype/:sid';
var addressTypesResource = $resource(addressTypesAPI, params, {query: {
method: 'GET'}, create: {
You should be able to output the whole response via
alert(JSON.toString(response)) and handle it from there.
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
You need to put some code in a Fiddle or Plunker for us to look at.
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email
to angular+unsubscr...@googlegroups.com.
To post to
If you are using Angular 1.3 you are out of
luck. https://docs.angularjs.org/guide/ie
If you are using Angular 1.2 you may have a bit more luck, but really
Angular isn't designed to work on that old browser that isn't and never
will be compliant with the current standards of web development.
Have you looked at
Angular-Class? https://github.com/marklagendijk/angular-class. It might get
you close to what you want.
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an
36 matches
Mail list logo