[AngularJS] Re: SEF/IIFE and Angular

2016-02-03 Thread 'Michael Bielski' via AngularJS
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: > >

[AngularJS] SEF/IIFE and Angular

2016-02-02 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: The 'Access-Control-Allow-Origin' header has a value 'https://dev.getevents.co' that is not equal to the supplied origin

2015-04-09 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: The 'Access-Control-Allow-Origin' header has a value 'https://dev.getevents.co' that is not equal to the supplied origin

2015-04-09 Thread 'Michael Bielski' via AngularJS
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

Re: [AngularJS] $resource timeouts

2015-03-30 Thread 'Michael Bielski' via AngularJS
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

Re: [AngularJS] $resource timeouts

2015-03-30 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: what is the default timeout for $http ?

2015-03-26 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: Question about AngularJS G+ community

2015-03-17 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: multiple click button (Stop actions performed multiple times)

2015-01-12 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: Protractor: Button click not working on Internet Explorer but works on Chrome and Firefox

2014-11-12 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: how we can iterate single test case in jasmine(Protractor framework)

2014-11-06 Thread 'Michael Bielski' via AngularJS
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:

[AngularJS] Re: how we can iterate single test case in jasmine(Protractor framework)

2014-11-04 Thread 'Michael Bielski' via AngularJS
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

Re: [AngularJS] Re: Way to remove $promise and $resolved properties from all resource responses?

2014-10-30 Thread 'Michael Bielski' via AngularJS
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

Re: [AngularJS] Re: Way to remove $promise and $resolved properties from all resource responses?

2014-10-30 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: Way to remove $promise and $resolved properties from all resource responses?

2014-10-28 Thread 'Michael Bielski' via AngularJS
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();

[AngularJS] Re: Opinion wanted: Testing Angular Project - Protractor + Jasmine/Mocha/etc or The Intern?

2014-10-15 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: Opinion wanted: Testing Angular Project - Protractor + Jasmine/Mocha/etc or The Intern?

2014-10-15 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: Angularjs end to end testing with Protractor

2014-10-15 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: FIltering Unit test cases in angular

2014-09-24 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: Can somebody ease my worried mind? I'm trying to avoid too many $http posts to the web server but believe that it's hurting my design

2014-09-18 Thread 'Michael Bielski' via AngularJS
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,

Re: [AngularJS] Can somebody ease my worried mind? I'm trying to avoid too many $http posts to the web server but believe that it's hurting my design

2014-09-18 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: Unresolved question at Stack Overflow: How to ngclick an A directive in a PhantomJS test

2014-08-29 Thread 'Michael Bielski' via AngularJS
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.

[AngularJS] Re: [protractor] [e2e] Disabling animations in the tests

2014-08-27 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: can i use protractor in non-Angular js applications for functiona testing???

2014-08-22 Thread 'Michael Bielski' via 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

[AngularJS] Re: My gotcha for the day - $http.verb vs $http() and options

2014-08-22 Thread 'Michael Bielski' via AngularJS
{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'}}})

Re: [AngularJS] Protractor not finding Angular

2014-08-20 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: can Protractor can be used to perform E-E testing other than AngularJs

2014-08-19 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: Protractor and Jasmine 1.3 - addMatchers

2014-08-13 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: Memory consumption in big AngularJS application

2014-07-22 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: Design question about UI logic

2014-07-03 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: Writing a unit test to check form has been completed

2014-06-25 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: $resource compared to $http

2014-06-25 Thread 'Michael Bielski' via AngularJS
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: {

[AngularJS] Re: $resource compared to $http

2014-06-25 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: Using $resource

2014-06-23 Thread 'Michael Bielski' via AngularJS
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

[AngularJS] Re: angularjs factory not working in ie

2014-06-13 Thread 'Michael Bielski' via AngularJS
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.

[AngularJS] Re: Powerful Class Structure

2014-06-09 Thread 'Michael Bielski' via AngularJS
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