[AngularJS] Re: Angularjs custom radio button directive

2013-12-23 Thread Daniel Tabuenca
Your problem is more of an html+css problem than an angular problem. You are generating radio inputs and labels using {{value}} as the id. You should not have duplicate element ids in a page, especially when using html . You need to make sure you generate unique ids for things. I’ve modified

[AngularJS] Re: how to view http pending requests ($http.pendingRequests)

2013-12-23 Thread Sander Elias
Hi Zilabify, an sleep(int $seconds) in your PHP should do the trick. regards Sander -- 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...@googlegrou

[AngularJS] Re: A lot of questions about directive's optional attributes

2013-12-23 Thread Daniel Tabuenca
The difference between declaring stuff in the scope: {} vs just reading the attributes inside the link function has to do primarily with whether we want to keep track of the values as they change. Things declared in the isolate scope will automatically get watches created to keep them in sync

[AngularJS] Re: RootScope variable VS Factory to share data across all controllers

2013-12-23 Thread Daniel Tabuenca
As a general rule, it is better to use services and dependency injection to share state between different parts of the application. However, putting a few broadly-used global variables like "currentUser" in the $rootScope is not necessarily horrible. That being said, as with any global state,

[AngularJS] Re: CSS Transitions on ng-view route changes

2013-12-23 Thread Aliaksandr Astashenkau
Even though this is a little old. But I think my 5 cents can be useful for as a demonstration of ngView animation in AngularJS 1.2. I created this demonstration of with different transition effects. Check it out: http://dfsq.github.io/ngView-animation-effects/app . -- You received this message

[AngularJS] Looking for a place to author angular js articles

2013-12-23 Thread Todd Adams
I would like to author one or more articles on Angular JS, and am looking for a home for these articles. Is CodeProject the best place for this, or are there any open blog sites that are specific to the angular community? -- You received this message because you are subscribed to the Google G

Re: [AngularJS] Re: Controller function not getting recognized in js file

2013-12-23 Thread Naveen Krishnan
Thanks Daniel, I got it now. On Mon, Dec 16, 2013 at 9:51 PM, Daniel Tabuenca wrote: > Woah! Why are you doing: > > myModule.controller = 'SampleController' > > What you just did there is replace the myModule.controller() function > with a string SampleController. This means next time you tr

Re: [AngularJS] 1.0.7 understanding the limits of double binding (within directive) and $watch sync

2013-12-23 Thread Daniel Tabuenca
Because of the way you have set up multiple watches inside and outside your directive, you’ve managed to expose a bug that I have fixed in the 1.2.x series: https://github.com/angular/angular.js/commit/2d0f

[AngularJS] Re: set variable in $watch sometimes fails?

2013-12-23 Thread Daniel Tabuenca
I replied on the other thread, but this is a bug that has been fixe in 1.2.x: https://github.com/angular/angular.js/commit/2d0f6ccba896fe34141d6d4f59eef6fba580c5c2 -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and

[AngularJS] Re: CSS Transitions on ng-view route changes

2013-12-23 Thread Tony Mountifield
In article <7fb1782b-10af-4fce-bad1-e2e0a01dd...@googlegroups.com>, Aliaksandr Astashenkau wrote: > > Even though this is a little old. But I think my 5 cents can be useful for > as a demonstration of ngView animation in AngularJS 1.2. I created this > demonstration of with different transition

[AngularJS] I have an understanding problem with Directives and Javascript

2013-12-23 Thread alycklama
I created a directive to handle date on a page: Name Range ** Range Start ** Range End **

[AngularJS] Re: A lot of questions about directive's optional attributes

2013-12-23 Thread Jesus Rodriguez
Gracias Daniel, Angular is good because it don't force you to follow any convention so you have the liberty of doing things like you want. That could be a double-edge sword. That liberty is good but sometimes it is hard to pickup some conventions that are good to follow. Your explanation was r

[AngularJS] Dynamic creation and event handling

2013-12-23 Thread Николай Измайлов
Look at the list on Ajax, where you need to keep track of the object and add it to the template html. how can I do ? -- 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 t

[AngularJS] Re: Dynamic creation and event handling

2013-12-23 Thread Николай Измайлов
It would also be convenient to create a dynamic object hang event. Take for example the goods in the basket. 1) you Can add items to your cart 2) you Can change quantity of the goods in a basket and so on.. 1) When you add an item to the cart, хотелоь would use a predefined template that is used

[AngularJS] using data from $resource

2013-12-23 Thread Daniel Lopez
Hi. I have a service dashboardServices.factory('Phone', ['$resource', function ($resource) { var resource = $resource('http://localhost:9000/api/json', {}, { query: { method: 'GET'} }); return resource; } ]); that returns me this {"List":[{"Name":"chart","Values":[10,11,12,

[AngularJS] Re: I have an understanding problem with Directives and Javascript

2013-12-23 Thread Daniel Tabuenca
What you are doing with jquery in a global $(document).ready() is not really the angular way of doing things. The angular way of doing things is to annotate the html and then write a directive to apply the javascript to that annotation. For example, you could have: Then in order to apply

[AngularJS] Angular Authentication with Node.js

2013-12-23 Thread Ben Srour
Hey guys, Looking for some quick guidance before I make a big investment related to refactoring how my app does auth. I've got a SPA backed by Node.js / Express / Passport. The general auth model today is: User requests / and I serve up index.html if the user is not authenticated. >From here

Re: [AngularJS] Re: RequireJS / AMD Integration with Angular JS

2013-12-23 Thread Jonas Rabbe
Like I mentioned, we are running tests with Jasmine and Karma in our RequireJS based setup. It's definitely doable and not as hard as I figured. The biggest hurdle was setting up `ng-html2js` because we do not have a global `angular` object available. I just started writing some of these small art

[AngularJS] Re: using data from $resource

2013-12-23 Thread Joseph Lehr
$scope.PhoneList = {"List":[{"Name":"chart","Values":[10,11,12,13,14,15]},{"Name":"chart","Values":[20,21,22,23,24,25]}]} {{list.name}} {{value}} you might have to set scope.PhoneList inside the resource call before the return resource On Monday, December 23, 2013 9:23:30 AM UTC-7, Dan

[AngularJS] Help: Dynamic UI with nested directive?

2013-12-23 Thread Kevin Le
I am trying to create a 2 level tab navigation with each sub-tab has dynamic UI content. I am trying to have the whole UI created from JSON definition with main TABs array where each tab contain sub-tabs array. Each sub-tab contain UI elements such as text, combobox, radio button, multi-selec

Re: [AngularJS] Re: using data from $resource

2013-12-23 Thread Thomas
I'll expand on this to say that it's rate to pass a service directly to the DOM. Services usually return their object data to a controller, which then interacts with the DOM. > On Dec 23, 2013, at 1:22 PM, Joseph Lehr wrote: > > $scope.PhoneList = > {"List":[{"Name":"chart","Values":[10,11,1

[AngularJS] Calling $http (or similar) without $apply?

2013-12-23 Thread Clint Checketts
In my application I have implements an $exceptionHandler that posts to a my server whenever and uncaught exception occurs. This is great for catching any client side errors. Initially I was using $http to post the data. However I soon noticed that it would loop: code throws an exception -> $excep

Re: [AngularJS] Tests for app "run" block

2013-12-23 Thread Clint Checketts
If you had an InitializationService that did all this work, then it would easy to test like any other service, and the run block would be simplified to merely calling the Init service. On Sun, Dec 22, 2013 at 5:27 PM, Sergio Rinaudo wrote: > Hi all, > I have some logic in the run block of my app

Re: [AngularJS] Tests for app "run" block

2013-12-23 Thread Sergio Rinaudo
Could you provide a simple example? Currently, I have something like this - A LoggedInLoader that is a Service that returns a promise. - This service is called in the run block If a try to run tests I get this error Error: Unexpected request: GET /url/to/service No more request expected in app

[AngularJS] Re: problem: 2 elements, opposite ng-if values, display simultaneously for an instant

2013-12-23 Thread Lucas Galfaso
Hi, - The directive ng-if and every other directive that remove/add DOM elements involves some performance hit. Try using ng-show that only adds/removes a class to the element (an operation that is a lot faster). - Be sure that foo.bar resolves to a boolean value, if this is not the case, then

Re: [AngularJS] Tests for app "run" block

2013-12-23 Thread Clint Checketts
Sounds like you are struggling with $httpBackend. Do you have a line like this? 1. $httpBackend.when('GET', '/url/to/service').respond({userId: 'userX'}, {'A-Token': 'xxx'}); 2. On Mon, Dec 23, 2013 at 3:56 PM, Sergio Rinaudo wrote: > Could you provide a simple example? > > Curr

Re: [AngularJS] Array of strings treated as arrays of chars

2013-12-23 Thread Lucas Galfaso
Hi, The ngResource API makes the assumption that the elements it is handling are objects, not strings. When ngResource receives a string, it tries to transform it to an object the best way it possible, so it is converted to the object you are seeing. Regards, Lucas On Friday, December 20,