[AngularJS] Re: How do I resolve and assign an inner controller from the outer's scope?

2014-01-20 Thread Sander Elias
Hi Mike, What you asking is possible, however, it involves some serious hoop-jumping! Before going this road, may I ask what you are trying to achieve? Perhaps there is a much simpler way to reach enlightenment ;) Regards Sander -- You received this message because you are subscribed to the

[AngularJS] Re: How do I resolve and assign an inner controller from the outer's scope?

2014-01-20 Thread Sander Elias
Mike, Hmm, after giving it a second thought, the hoop-jumping wasn't that difficult :) Here is a working fiddle http://goo.gl/JmzQY2 Regards Sander -- You received this message because you are subscribed to the Google Groups AngularJS group. To unsubscribe from this group and stop receiving

[AngularJS] Re: [angular.js] Binding with input type=number

2014-01-20 Thread Andy Baker
Just another anecdote to add to this. Django Rest Framework serializes fixed-point decimal values as strings in JSON as the only other option - float - would result in loss of precision. The problem is that this means Angular doesn't set bound fields where the input is type=number. What's the

[AngularJS] Re: ngOptions doesn't work correctly with ngBindHtml

2014-01-20 Thread Valentine Nesterov
Hi Sander, Thanks for the advice. I knew that my problem can be solved with ng-repeat, but i hoped that this problem can be solved otherwise. Unfortunately i can't use a unicode characters. On Friday, January 17, 2014 6:06:57 PM UTC+3, Sander Elias wrote: Hi Valentine, ngBindHtml can't be

[AngularJS] Show errors on form, when submitting without dirty fields

2014-01-20 Thread ngschumi
Hello guys. I'm quite new to angular, but i havn't been able to find any clues on this submit how i should handle it. Im creating the a form and the fields gets validated fine when typing into the fields, min-length max-length and so on. But i can't seem to find a way how i should be able to

[AngularJS] Re: Create form json keeping field name as key

2014-01-20 Thread Pushpendra Kumar
I want exactly same : form data-ng-submit=submitInvoiceForm(); name=myForm novalidate input type=text name=myNumber ng-model=number value=entered text/ input type=submit value=save/ /form on submit form: console.log($scope.myForm); // {myNumber: entered text }. can anyone please suggest me..

[AngularJS] Re: [angular.js] Binding with input type=number

2014-01-20 Thread Sander Elias
Hi Andy, If you need this, it is not that hard to make angular do what you need. in this fiddle http://goo.gl/K5k9RZ I created an small directive to handle what you need, and you don't even have to change anything in your template/HTML Regards Sander -- You received this message because you

[AngularJS] Re: ngOptions doesn't work correctly with ngBindHtml

2014-01-20 Thread Sander Elias
Hi Valentine, The only other option that comes to my mind is to preparse your data. What I mean by that is that before displaying your data, you should convert it to unicode. something like: function htmlDecode(input){ var e = document.createElement('div'); e.innerHTML = input;

[AngularJS] Re: Angular Js Vs Ember Js

2014-01-20 Thread Jeremy Likness
Angular can scale quite fine. I've been using it in a large development project. By large I mean hundreds of thousands of LOCs with more than two dozen developers for a year now. We reaped tremendous benefits by moving from the older framework we were on to Angular. Not only does it scale well

Re: [AngularJS] Issue in adding smart banner on home page

2014-01-20 Thread douglas.lira.web
I believe that the ui-router can solve your problem Enviado por Samsung Mobile Mensagem original De : Sandeep Agrawal sandeep.goyal1...@gmail.com Data: 20/01/2014 14h37 (GMT-03:00) Para: angular@googlegroups.com Assunto: [AngularJS] Issue in adding smart banner on home

[AngularJS] ui-router, local storage, restangular, service kunundrum

2014-01-20 Thread Brad McAlister
I'm trying to figure out how to have my app check to see if a user is logged in and if so route them directly to the 'home' page and if not route the to the login page. I need the local storage data to be available across controllers so it seems like a service is the best fit for this. However,

[AngularJS] Re: How can I ajax in some data, and make it availble app wide...

2014-01-20 Thread p. stephen w
Thanks Sander, 2 could work, but I think I'm left with the same dilemma. Where do I store the data and how do I make it available to the controllers and directives? The goal is to parse the JSON on a per page basis in a few different directives which will build out page specific HTML. The

[AngularJS] Re: Two directives on the same element, one manipulates the part of the DOM the other directive created

2014-01-20 Thread Sander Elias
Hi Kalle, Although your sample works now, this is not the right way to approach the problem at hand. You are still using the DOM as source of truth. In angular it isn't. If you are reading the dome to get some data, you are doing it wrong. have a look at this:

[AngularJS] Re: How can I ajax in some data, and make it availble app wide...

2014-01-20 Thread Sander Elias
Hi Stephen, here you go: https://groups.google.com/forum/#!searchin/angular/configuration$20bootstrap/angular/QQcKjcG18z0/887cmL5hEx0J https://groups.google.com/forum/#!searchin/angular/configuration$20bootstrap/angular/QQcKjcG18z0/887cmL5hEx0J If you combine my answer(s) with that off Jason,

[AngularJS] Re: Two directives on the same element, one manipulates the part of the DOM the other directive created

2014-01-20 Thread Sander Elias
Hi Kalle, another alternative, if you really just need an array as you started your sample with: http://jsfiddle.net/SanderElias/5v35s/ Regards Sander -- You received this message because you are subscribed to the Google Groups AngularJS group. To unsubscribe from this group and stop

[AngularJS] Re: From angular framework to using some other framework.

2014-01-20 Thread Sander Elias
Hi Raja, A rewrite? Basicly the same for whatever framework you are trying to swap out for another. Angular isn't different in this regard. What is different, is that you would dearly miss a lot of what angular does in your 'new' version. Regards Sander -- You received this message because

[AngularJS] Re: How can I ajax in some data, and make it availble app wide...

2014-01-20 Thread p. stephen w
Nice, that does make sense. Thanks again for the info. stephen On Monday, January 20, 2014 9:58:27 AM UTC-8, Sander Elias wrote: Hi Stephen, here you go: https://groups.google.com/forum/#!searchin/angular/configuration$20bootstrap/angular/QQcKjcG18z0/887cmL5hEx0J

[AngularJS] Re: How can I ajax in some data, and make it availble app wide...

2014-01-20 Thread p. stephen w
...and it works! For the record, it looks like the code below. This was oddly difficult, and a little outside the Angular way of doing things which makes me concerned about unit testing, but I'll cross that bridge when I get there. /* top of app.js file, before any Angular work is done. */

[AngularJS] Re: Two directives on the same element, one manipulates the part of the DOM the other directive created

2014-01-20 Thread Kalle Björklid
maanantai, 20. tammikuuta 2014 19.45.52 UTC+2 Sander Elias kirjoitti: Although your sample works now, this is not the right way to approach the problem at hand. You are still using the DOM as source of truth. In angular it isn't. If you are reading the dome to get some data, you are

[AngularJS] ng-view not recognized from included templates

2014-01-20 Thread Dmitri Zaitsev
It seems the router does not attach template to ng-view if that Element is within _included_ template. However, it does get recognized, once another ng-view is present in index.html. Here is an example, where both ng-view get replaced: http://plnkr.co/edit/D9XjjV70OHRZYTYKYk31?p=preview And

[AngularJS] Re: How can I ajax in some data, and make it availble app wide...

2014-01-20 Thread Sander Elias
Hi Stephen, Looks good to me. The core angular team seem to follow my #1 approach. Testing is easy, just put in some hardcoded json in your constant, and you're set to go. And yes, it's outside angular, because it needs to be in this case. However, that you use angularJS in your app, doesn't

[AngularJS] Re: ng-view not recognized from included templates

2014-01-20 Thread Sander Elias
Hi Dmitri, This has to do with the way ng-route works. During the CONFIG phase of your app, the router looks for the ng-view directive. Thats not yet loaded at that moment, so, nothing gets display'd Also, you can have only 1 ng-view in your app. (how is route going to figure out which one you

[AngularJS] Re: From angular framework to using some other framework.

2014-01-20 Thread KamBha
I have been thinking about this problem myself as my company has had a crisis of faith with its current tech stack (GWT specifically), so I appreciate where you are coming from. Not based on anything except my understanding of how angular and DI works, I would think that an angular app is very

[AngularJS] New DI framework

2014-01-20 Thread KamBha
Hi, I just saw this video:- http://www.youtube.com/watch?v=_OGGsf1ZXMs I thought this was awesome. Anything that makes Angular DI more like Guice is great in my books. A couple of questions though:- * When can we expect to get this functionality? Would we have to wait for 2.0? I found the

[AngularJS] Disabling checkboxes when one is already selected...

2014-01-20 Thread telagraphic
In a ng-repeat collection, when a record has its checkbox selected I want to disable all the other records checkboxes. With my current code, that works but you can still checkbox the disabled checkbox. Very strange... http://plnkr.co/edit/jQ1qaUMKIy0Q4gswW6Ib -- You received this message

[AngularJS] Controller being executed twice (only on refresh - not link navigation)

2014-01-20 Thread Josh Schreuder
Hi, I have noticed something recently whereby my controller is being executed twice when refreshing the browser windows. Unfortunately I can't seem to replicate this in a simple example. My routes are setup with a controller and templateUrl, however, navigating to the route via a link does

[AngularJS] Re: Controller being executed twice (only on refresh - not link navigation)

2014-01-20 Thread Josh Schreuder
Will mention also that I am using ngRoute, not ui-router or similar. On Tuesday, 21 January 2014 10:08:06 UTC+11, Josh Schreuder wrote: Hi, I have noticed something recently whereby my controller is being executed twice when refreshing the browser windows. Unfortunately I can't seem to

[AngularJS] Re: Isolated Scope binding issue

2014-01-20 Thread David Colwell
You've named the attribute name-attribute which will map to a variable nameAttribute in your angular directive. Rather than try to have this in your scope... name: =nameAttribute Use this in it's place... nameAttribute: = Then bind to the property nameAttribute instead of name. You'll

[AngularJS] Responsive Navbar Example

2014-01-20 Thread Andrew Rennhack
Trying to get a simple responsive navbar working with bootstrap 3.0.0 and can't figure it out. I copy and pasted the code from http://angular-ui.github.io/bootstrap/ Some navbar docs would be great. http://plnkr.co/edit/zMaishdZiSqS7rT6buBi?p=preview -- You received this message because you

[AngularJS] Re: Concerns About Detached DOM Trees And AngularJS

2014-01-20 Thread Ryan Swart
I'm also suffering from detached DOM trees, and object properties that cling on to them. I'm not manually manipulating the DOM, just using Jquery, ng-repeat and a couple of ng-shows and hides https://lh6.googleusercontent.com/-CM6Lx49vMeo/Ut4MXJtDFHI/Fik/UxeO2DYmcm0/s1600/snapshot1.png

[AngularJS] Re: Responsive Navbar Example

2014-01-20 Thread Andrew Rennhack
I ended up getting a working example here: https://github.com/andr3w321/angularjs-bootstrap3-responsive-navbar-example I also opened an issue on github to get this or something similar added to the docs: https://github.com/angular-ui/bootstrap/issues/1628 On Monday, January 20, 2014 5:49:28 PM