[AngularJS] Re: $scope and var

2014-05-09 Thread Sander Elias
Hi Nimesh, Technically the ```var name = 'value'``` is faster. However, the performance of both is extremely high. I recall a benchmark of a few years back and it was something like 200.000 lookups for a var took 5Ms, and 200.000 lookups for a 3 level deep object took 6Ms Bottom line, no real

[AngularJS] Re: $scope and var

2014-05-09 Thread Sander Elias
Hi Nimesh, Yes the same goes for all variable assignments/accesses. 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...@googlegroup

[AngularJS] Re: Using multiple directives with ng-options

2014-05-12 Thread Sander Elias
Hi Billy, The code I provided in my last function already provides for an way to get the dates and hours updated based on the input of the user. If you adapt your service to to the actual fetching based on the parameter it receives, you are done there. And looking into it, and decide for yours

[AngularJS] Re: Using multiple directives with ng-options

2014-05-12 Thread Sander Elias
Hi Billy, I'm not sure I can follow you, do you mean something like this: http://plnkr.co/edit/7F3nlgtxT9sx2FJ4isMF?p=preview I updated the plunk to give a different time-table when you select the May 22, 2014 date. Is that what you mean? Regards Sander -- You received this message because yo

Re: [AngularJS] mg-grid expected behaviour

2014-05-12 Thread Sander Elias
Richard, You should start a new thread, there is more change anyone else will pick up on your questions that are not related to the discussion in here! Regards Sander -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group

Re: [AngularJS] mg-grid expected behaviour

2014-05-13 Thread Sander Elias
Hi RIchard, I assumed you made a mistake and posted in an unrelated thread! I thought I'll let you know ;) And no, you can ask ng-grid question in this forum. I don't use it, so I can be of little help to you. However, using JQ-2.x is not a good idea, there are still issues with this version. T

[AngularJS] Re: Efficient LocalStorage

2014-05-13 Thread Sander Elias
Hi Toni, Have a look at the $destroy event of the scope. If you have something like an appscope, ir will receive an $destroy event. (that is for a normal shutdown!) If your app is forced out of existence (browser closed/system shutdown/user), you might want to (h/l)ook into the browser clos

[AngularJS] Re: Using multiple directives with ng-options

2014-05-13 Thread Sander Elias
Billy, In Angular you don't replace elements. you are working on the data. In my example it does reset the time if the date changes. As that was part of what you asked for, I did add the following line in the sample: ```javascript $scope.appointment.appointment_time = null; //reset time

[AngularJS] Re: Form Validation Not Working For Some Users

2014-05-14 Thread Sander Elias
Hi, Did you verify if your users used a password manager or other form-filling solution? You need to take that into account! Search this group for solutions, there are a few available already. Regards Sander -- You received this message because you are subscribed to the Google Groups "Angula

[AngularJS] Re: prevent url from displaying the #path

2014-05-14 Thread Sander Elias
Hi Neil, Put your app inside an (i)frame, this gives your the most control. 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...@goo

[AngularJS] Re: Using multiple directives with ng-options

2014-05-14 Thread Sander Elias
Hi Billy, I know in angular we shouldnt be doing that we do in jquery as far as re > placing the data the way I did there so I have to re-examine my code > because I was setting the variable = '' instead of null. Not sure if that > makes a different but maybe I set it at the wrong time in the c

[AngularJS] Re: rootScope not retaining value after hitting browser refresh

2014-05-14 Thread Sander Elias
Hi, Hitting F5 is the equivalent of closing and opening your browser. Hence, you start fresh, with nothing in memory. There is nothing angular cab do about that. If you want to retain your users session you have to store it. A cookie or localStorage are mostly used for this kind of stuff. Do n

[AngularJS] Re: Form Validation Not Working For Some Users

2014-05-14 Thread Sander Elias
Hi, Its not about validators. The problem is that the programs I told you about change the data outside angulars scope. So it becomes your responsibility to inform angular of the newly arrived data. Regards Sander -- You received this message because you are subscribed to the Google Groups "A

[AngularJS] Re: Repetitive patterns

2014-05-15 Thread Sander Elias
Hi Breaddes, There are multiple way's to solve this. What do you think about this: http://plnkr.co/edit/A2bW7Fatg0aEEoKqqp0Q?p=preview Regards Sander -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiv

[AngularJS] Re: Update $scope.variable value after POST

2014-05-16 Thread Sander Elias
Well, you are assigning your todo's as a result of your $http. That's a change, so the $watch will pick up on this change.. -- 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

[AngularJS] Re: Unable to change $scope variable data using $on.

2014-05-17 Thread Sander Elias
Hi Nabaraj, you need to use $timeout to set your tiers, or use $scope.$apply if you assign you value. Probably you are updating your value outside of angulars scope, and it will not detect the change until the next digest cycle! Regards Sander -- You received this message because you are sub

[AngularJS] Re: Directive and Controller combination in Single HTML, changes based on route.

2014-05-17 Thread Sander Elias
Hi, you missed the ng-view part of the routing: https://docs.angularjs.org/api/ngRoute/directive/ngView 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

[AngularJS] Re: What is the best way to pull a query parameter from the URL in a non-SPApplication?

2014-05-19 Thread Sander Elias
Dennis, A few things stuck out to me in your message. 1. your jsonresponse.php can read this info out of the caller context, why do you want to pass it in by hand too? (php can see the calling url, right?) 2. $location gives you full access to the URL, you can parse out the part

[AngularJS] Re: angularjs radio box and input text

2014-05-19 Thread Sander Elias
Hi Zied, If you have questions like this, it's way easier if you post them in a plunk ;) Here you go: Plunker Play arround with it a bit, it might work a bit different then what you imagined. the missing part was the ng-value, in stead of the value attribu

Re: [AngularJS] Re: Use ui-validate inside a directive template

2014-05-19 Thread Sander Elias
Chris, >From the code you posted I can't say what goes wrong. If your validation function does not get called, you have a different problem. Personally I never used ui-valid, so this is too little for me to go on. If you would build a plunk/fiddle/jsbin illustrating your problem, I will happily

[AngularJS] Re: AngularJS and jQuery recompiling dom

2014-05-20 Thread Sander Elias
Hi Axx, Your sample is not a SPA, it are 2 separate pages. That is not a problem, but you need to load angular and stuff on every page or it will not work. Reading up about ng-route and ng-view see

[AngularJS] Re: detect update in spa

2014-05-20 Thread Sander Elias
Hi Zoltan, You don't need a shared config, or custom http headers for the solution to work! However, you need something on your back-end. If you want to compare versions, you need to to get one off the variables from somewhere else don't you? you can't compare the front-end version to itself.

[AngularJS] Re: angularjs radio box and input text

2014-05-20 Thread Sander Elias
Hi Zied, Your sample just shows what radio buttons do. I have a hard time understanding what it is you are trying to accomplish? is it something like this: http://plnkr.co/edit/Bo2u7F?p=preview Regards Sander -- You received this message because you are subscribed to the Google Groups "Angula

Re: [AngularJS] Re: transclude - what am i doing wrong?

2014-05-21 Thread Sander Elias
Hi Tony, Its way easier to let the code do the talking this time! http://plnkr.co/edit/uQZXHfNb4aduTBMRinI7?p=preview Is that enough to help you? Regards Sander -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and s

Re: [AngularJS] Re: transclude - what am i doing wrong?

2014-05-23 Thread Sander Elias
Hi Tony, I did reread the thread now. The first time around I thought you were asking for an way to manipulate the trancluded template. My sample showed a way to do just that. Now I realized myself that you have a question about scoping. If you are using a isolated scope, this scope is only ava

[AngularJS] Re: Tutorialissuewithstep8

2014-05-23 Thread Sander Elias
Hi Albert, Your comment are read for sure, but this is not the place to get it fixed! If you want to help Angular forward, you can file an github issue at thetutorials git (you need to be logged in to github for the link to work!) Regards Sand

[AngularJS] Re: Which Version should I use?

2014-05-23 Thread Sander Elias
Hi Ed, There are a few breaking changes between 1.2 and 1.3, and as time passes,the list will get longer. In learning angular there are no big differences, and the breaking changes often need some small rework of a small part of

[AngularJS] Re: How to iterate through the Key-Value pair ?

2014-05-23 Thread Sander Elias
Hi Triven, Your pro.Value is a string, not an object. It's kind of hard iterating a string as an object ;) 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 e

[AngularJS] Re: Different Model Object use same view

2014-05-23 Thread Sander Elias
Hi Diwan, I will take a look at your issue if you will provide a plunk for it. To answer your question, yes it is possible. 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 f

[AngularJS] Re: Is javascript single-threaded or why do I need timeout trickery?

2014-05-25 Thread Sander Elias
Hi Larion, You are right, javascript runs in a single thread. Personally I don’t think a setTimeout is a particularly good practice! Sometimes you just have to use it, but its often a source of confusion. At the core of this is the AngularJS digest system. For some changes it takes a full dig

[AngularJS] Re: Is javascript single-threaded or why do I need timeout trickery?

2014-05-25 Thread Sander Elias
Hi Larion, You are right, it is just javascript. AngularJS is also javascript, so it can't run a digest cycle between 2 statements is it? example in a directive I do: ```javascript scope.model = 'blah'; // model is bound to something else way up in the hierarchy. // here is no time for angula

Re: [AngularJS] Re: Is javascript single-threaded or why do I need timeout trickery?

2014-05-26 Thread Sander Elias
Hi Eric, The doSomething was just a pseudo code example;) Nevertheless, it really does not matter if it takes a long time (if it is a really computing intensive task, it should be carried over to a web-worker!) Both the timeout and the asynceval set it to execute at a later time, but both do ex

[AngularJS] Re: Directive inside directive, wait for html to load

2014-05-26 Thread Sander Elias
Hi Joberto, Have a look at directive priority. Also you can use he angular event system to catch and fire the load event. 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 fr

[AngularJS] Re: HTML view cant reach isolated directive scope

2014-05-26 Thread Sander Elias
Hi onlyOneUrl, So, you are replacing and transcluding an repeated directive with an isolate scope? You should drop the replace, it does not add any value to your directive, it only complicates things! And it's deprecated by the core-team anyway! If you transclude an element, the inner HTML gets

[AngularJS] Re: how to update scope key from controller

2014-05-26 Thread Sander Elias
Hi Marc, Your controller is operating on a different scope. ng-repeat creates a new scope for every instance. in this case your template is setting editRow on the scope from the repeat, and the controller is setting it's parent. Regards Sander -- You received this message because you are sub

[AngularJS] Re: need a working multi language (translate) working sample

2014-05-27 Thread Sander Elias
https://github.com/rubenv/angular-gettext-example -- 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

[AngularJS] Re: HTML view cant reach isolated directive scope

2014-05-27 Thread Sander Elias
Hi OnlyOneUrl, You really should build a plunk that shows the same problem you are experiencing. I solved a lot of my own problems by just recreating them in a plunk. At first sight your problem lies in here: {{ key }} All your colum

[AngularJS] Controller is invoking 2 time on Single click of a submit button

2014-05-29 Thread Sander Elias
Hi, Do nog load angular twice. Thats the root of your problem. -- 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 thi

[AngularJS] Re: compile vs link for populating a select field

2014-06-01 Thread Sander Elias
Hi Iain, Well, the compile phase only runs once. So it depends on your circumstances. If your data is static during the application, use the compile phase, otherwise use the link fase. The better solution is move the xhr to a service, and deal with it in there, and just inject this service to y

[AngularJS] Re: How to update model from outside Angular?

2014-06-01 Thread Sander Elias
Hi Marko, As Witold pointed out, the apply isn't optional. To answer your question, yes, this is a correct way to update from the outside. However, you need to be sure your change isn't going to have side-effects that are less pleasant. While sometimes it's perfectly ok to do something like thi

[AngularJS] Re: Advice on BKM for integrating standalone lib across all controllers

2014-06-01 Thread Sander Elias
Hi Chris, I'm glad you got this down! 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...@googlegroups.com. To post to this group,

[AngularJS] Re: How to multiply the return values of different controllers?

2014-06-01 Thread Sander Elias
Hi Modesto, I have no clue what it is you are trying to accomplish. Also dumping code here like you did isn't following the guidelines . If you build a plunk/fiddle/jsbin showing what it is you are trying, there is a much larger chance of getting

[AngularJS] Re: Scopes in an ng-if / ng-transclude directive

2014-06-02 Thread Sander Elias
Hi Eric, > > I like to see it as grown behavior, more then as intended behavior. But yes, your observations are correct. This is the way angular behaves in your scenario. That is, if you insist on having an isolate scope. Here is an alter

[AngularJS] Re: How to update model from outside Angular?

2014-06-02 Thread Sander Elias
Hi Marko, Your code sample confuses me a bit, can you please explain what you are trying to do. as I see your code it does the following, On the device ready event, it bootstraps angular. so angular only starts after the event, and then you need to update angular after the event? does the devi

[AngularJS] Re: How to multiply the return values of different controllers?

2014-06-02 Thread Sander Elias
Hi Modesto, Ah, now I see what it is you are after. I see you just started with Angular. Do yourself a favor, and drop jquery for the time you are learning AngularJS. have a look at this video: https://egghead.io/lessons/angularjs-sharing-data-between-controllers (and while you are at it, wat

[AngularJS] Re: html5mode and direct entering of URL

2014-06-02 Thread Sander Elias
Hi lokesh, This should be fix at your server side. What server are you using? 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...@g

[AngularJS] Re: How to update model from outside Angular?

2014-06-02 Thread Sander Elias
Hi Marko, Why can't you set the model then the normal way inside angular? Or do you need some information off the even inside your angualr app? Regards Sander -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and sto

[AngularJS] Re: How to multiply the return values of different controllers?

2014-06-02 Thread Sander Elias
Hi Modesto, You are welcome, and the link works fine for me ;) 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...@googlegroups.com

[AngularJS] Re: How to update model from outside Angular?

2014-06-02 Thread Sander Elias
Hi Marko, Just set it in your controller. the controller will only exists after the event (as the rest of your angular app will too!) Regards Sander -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receivin

[AngularJS] Re: Simple ngClass question

2014-06-02 Thread Sander Elias
Hi Istvan, you can’t add multiple classes within a single property. Remember it still are properties of an object. will work tough. Still, I would prefer option 2. Regards Sander ​ -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscrib

[AngularJS] Re: Angular Way to control a Directive from Controller?

2014-06-02 Thread Sander Elias
Hi Iain, I did this a couple of times. Works like a charm. You can design the controller so, that it can serve as an API for your directive. Regards Sander -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop r

[AngularJS] Re: Is it possible to call directive with module name?

2014-06-02 Thread Sander Elias
Hi Huy, Short answer: No, this is not possible. What most people do in this case is prefix the directives by hand. In your case you would en up with sharedShowAvatar and emailShowAvatar. Some people like to put in a dot between the prefix and the actual name, like shared.showAvatar and email.sho

[AngularJS] Re: How to update model from outside Angular?

2014-06-03 Thread Sander Elias
Hi Marko, If you have events happening you can't catch within angular, your way is indeed a good way to put them in. (I can not come up with something that needs this!) You only need to bootstrap Angular once, once that is done, you can pretty much handle everything from within angular. This i

[AngularJS] Re: Angular JS not working in Chrome 24

2014-06-03 Thread Sander Elias
Hi Jaydeep, Move the {{understand}}} inside the 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...@googlegroups.com. To post

[AngularJS] Re: Angular JS not working in Chrome 24

2014-06-03 Thread Sander Elias
Hi Jaydeep, Probably some script isn't loading. have a look at your developers console (F12) and go from there. 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

[AngularJS] Re: wish to be more intuitively object-oriented.

2014-06-03 Thread Sander Elias
Hi, hmm, yet another OO should rule everything opinion. Perhaps I missed something I my 40 years of programming, but can you point me to a independent study that confirms your belief? A study that clearly states that OO as a programming paradigm is better than anything else? I'm not asking for

[AngularJS] Re: Angular Way to control a Directive from Controller?

2014-06-03 Thread Sander Elias
Hi All, As an sample to his question, I created this small plunk to show a way on how this can be done. It is a sort of discussion starter. For myself, I think this is a very angular way to expose selected parts to the view and to the scopes inside the directive. also ch

[AngularJS] Re: "controller as" vs $scope

2014-06-03 Thread Sander Elias
Hi Migajek, The advantage is that it is easier to comprehend. Also, in the view/html its more clear where your data is coming from. There is also a difference in life-time between a controller and a scope. Also a scope comes with build-in goodies like $scope.$watch/$emit/$on/... Those are not d

[AngularJS] Re: remove angular markup

2014-06-03 Thread Sander Elias
Hi Billy, Yes, I noticed your message ;) If you really want this, it is possible. Not easy, but possible. The question should be, why? In an angular app, the HTML as exposed by the browser is only a temporary snapshot of part from the state of your app. So why should you be concerned by that? D

[AngularJS] Re: remove angular markup

2014-06-03 Thread Sander Elias
Hi Billy, I was just looking back for something else, and I found this plunk I created a while ago. it uses bootstrap and angular. Have a look at the markup. Now imagine you need to reproduce this using jquery (or some other framework) Do you think the markup that gets

Re: [AngularJS] Re: Angular Way to control a Directive from Controller?

2014-06-03 Thread Sander Elias
Hi Witold, The crux of the example was not solving a color thingie the simplest way possible. It is on how to communicate with an directive. on how an directive can expose some parts of it's functionality to the view, or even to a controller. An more real world scenario would be an tabs directiv

[AngularJS] Re: wish to be more intuitively object-oriented.

2014-06-03 Thread Sander Elias
Hi Leo, Hmm, of all the source in AngularJS, you pick the part that's build like this to be able to be compatible with jquery (which is build pretty much similar to jqLite). And yes, I did look into the JQ code a long time ago, so there were no surprises like that for me. How is this proof tha

[AngularJS] Re: remove angular markup

2014-06-03 Thread Sander Elias
Hi Billy, In angular, the markup is part of your code. There is nothing wrong with cleaning that up so it looks nice. You should do just that. But removing the parts that make it angularish (Pretty sure that isn't a word!) will not make it cleaner, or better readable. Regards Sander -- You re

[AngularJS] Re: How to reapply directive when scope is changed in AngularJS

2014-06-03 Thread Sander Elias
Hi Jason, Your sample works fine, even without the $rootScope.$broadcast('test');. However, it will not update if you change something at a deeper level in your menu. There is a third parameter to $watch that you can set to true, if you do so, it will work. Play with this, and lookup the docu

[AngularJS] Re: change $location.path() but prevent route change?

2014-06-03 Thread Sander Elias
Hi Nikita, What you want is only possible if you enable the HTML5 mode in the $location service. have a look at the documentation for details. Regards Sander -- You received this message because you are subscribed to the Google Groups "AngularJS" g

Re: [AngularJS] Re: change $location.path() but prevent route change?

2014-06-04 Thread Sander Elias
Hi Nikita, I just know it is possible, I have not done it myself yet. It is not just flipping some switch and be done with it. To get this working you need to study the HTML5 history api . this article

[AngularJS] Re: How to reapply directive when scope is changed in AngularJS

2014-06-04 Thread Sander Elias
Hi Jason, Yes it is working for me. It works even if I remove the 3rth parameter. It works in Chrome, Firefox and opera. Did you try cleaning your browsers cache? Regards Sander -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe fro

Re: [AngularJS] XMLHttpRequest cannot load error

2014-06-04 Thread Sander Elias
Hi Vladimir, look up CORS 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...@googlegroups.com. To post to this group, send email t

[AngularJS] Re: "controller as" vs $scope

2014-06-04 Thread Sander Elias
Hi Migajek, Well, if you use ng-controller, a scope will get created before your controller gets instantiated, and if will be destroyed after the controller is gone. there is a small difference there, and for 99% of the practical uses, it makes no difference there. However, ng-controller is n

[AngularJS] Re: Angular Way to control a Directive from Controller?

2014-06-04 Thread Sander Elias
Hi Luca..., How is this different from the example I gave earlier on? You are using the scope directly in your directives controller, this is coupling the directive and the controller in a very tight way. The idea of my sample was on how to expose an API from within a directive. Most of the tim

Re: [AngularJS] Re: How to reapply directive when scope is changed in AngularJS

2014-06-04 Thread Sander Elias
Hi Jason, I did not change a thing on your last fiddle, it just runs. When I remove the 3rth parameter, it keeps on working, across all those browsers. Your problem must lie somewhere else, as your fiddle runs without problem for me! Regards Sander -- You received this message because you a

[AngularJS] Re: Angularjs ng-model update

2014-06-05 Thread Sander Elias
Hi Madhu. In your controller do $scope.input = newValue. However, that is not related to the input attribute apearing in your template! Regards Sander ​ -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop re

[AngularJS] Re: Window resizing differences between v1.0.8 and v1.2.x?

2014-06-05 Thread Sander Elias
Hi Dan, Well, without an sample, it's difficult to give you advice. Can you put up a plunk/fiddle/jsbin showing your problem? Did you try another 1.2.x version? 1.2.9 is quite old, the current version is 1.2.16. I know there were a few jquery related patches in there, but I don't recall in whic

Re: [AngularJS] This is probably a dumb question, but could someone help me, please? It's about selects.

2014-06-05 Thread Sander Elias
Hi Daniel, As you are new, you forgot that getting results with $http will actually take place after completing your complete controller. So at the moment you are joining your brandListSelectDirector with brandList, the later one is still empty. have a look at this: http://plnkr.co/edit/YppWnAKr

[AngularJS] Re: Advantage vs disadvantage of wrapping module or controller with anonymous function

2014-06-05 Thread Sander Elias
Hi aSet..., hmmm, an anonymous question on anonymous function, go figure... Ok, it is always best practice to use an IIFE (Immediately Invoked Function Expression), even when you are not using angular. There are no pra

[AngularJS] Re: Dear Google, solve our AngularJS/SPA vs SEO/social sharing issues by a free prerender service :)

2014-06-06 Thread Sander Elias
Hi Dennis, This group is Angular users helping Angular users. I get your frustration but you are using the wrong channel. Apparently its over your head finding the right channel ;-D Nevertheless, just because you asked in this group, I traveled back in time, and called my buddy Larry, and see

[AngularJS] Re: How I can know nearest scope what contain the element?

2014-06-06 Thread Sander Elias
Hi Олег, According trough the docs and the code, de scope function should do it’s own recursion. Can you provide a plunk with the issue you are experience? Oh, this is the entire .scope() function out of the angular source: function(element) { // Can't use jqLiteData here directly so we s

[AngularJS] Re: Best practice to put ng-controller

2014-06-06 Thread Sander Elias
Hi Andi, There is no “better” it’s just different. Your first approach is the most common way angularJS apps are build. The second way is seldom seen. With good reason, in practice that’s kind of confusing. Let me explain a bit. If you put in a ng-controller=’xxx’ there will be a new instance o

[AngularJS] Re: :first child in angularjs

2014-06-11 Thread Sander Elias
Hi Madu, In AngularJS, your data is in control, so if your change your first element in the array, the DOM will follow automatically. Usually you don't need to fiddle around with DOM elements. Perhaps you have hit some exception, but I can't tell from your message. If you would post an plunk/fi

[AngularJS] Re: Strange issue w/transclusion: scope event duplicated

2014-06-11 Thread Sander Elias
Hi Nicolas, Some people don't look multiple times a day in this group, so it might take a few day's to get an answer! I have taken a look at your sample. It looks like you are on the right way. However, in the last release of 1.3 (beta 11) there are a quite some changes around transclusion that

[AngularJS] Re: Is it possible to create a general purpose recursive directive ?

2014-06-11 Thread Sander Elias
Hi Al-Shwafi, Search for recursion in this group, there are some more or less generic solutions in there! 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 em

[AngularJS] Re: angular compile code added dynamically

2014-06-11 Thread Sander Elias
Hi Maxim, Have a look at the $compile service. But usually you don't need anything outside angular to add parts to the page. I think you might want to look at ng-include too. usually one does not need to compile once angular is bootstrapped! Regards Sander -- You received this message because

[AngularJS] Re: angular compile code added dynamically

2014-06-12 Thread Sander Elias
Hi Maxim, I know you want to load dynamic data, but after you have bootstrapped angularjs, you can use it to load the rest of the modules don't you? If that's for some reason is impossible you can use the $compile service to 'bootstrap' your components. Regards Sander -- You received this mes

[AngularJS] Re: I am trying to apply angular validations. Can anyone help me out in my problem?

2014-06-12 Thread Sander Elias
Hi Jonathan, This is one of the reasons you can nest forms. have a look at this: http://jsfiddle.net/cdNQL/ I modified your fiddle to include an extra level of forms, called subform, this makes local error handling possible, while the error's still bubble up to the main form. Regards Sander

[AngularJS] Re: AngularJS Expressions does not get evaluated, on changing localhost to different name in tomcat server 7

2014-06-12 Thread Sander Elias
Hi Satish, As Stephen told you, we can't help you if you provide no information. What are the errors in the developers console? (ctrl-f12 in chrome!) Regards Sander -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group a

Re: [AngularJS] Re: Angular Way to control a Directive from Controller?

2014-06-13 Thread Sander Elias
Hi Sergio, Ganaraj, Thanks for your input. However I reacted to an earlier question, the question itself was not mine! I made a small sample that shows a way, on how to expose an API (in the form of an directive-controller) to it's children, and even to the scope and controllers. The sample is

[AngularJS] Re: Angular Way to control a Directive from Controller?

2014-06-13 Thread Sander Elias
Hi Łukasz, I did not read your code very well the first time around! You are indeed doing the same thing as I did, with the exception that I used the controllerAs to expose my directive name to the scope, and you are exposing it to the scope using a variable name. This is a clever way, and migh

[AngularJS] Re: Angular app design questions: controllers, views and conditional transitions

2014-06-13 Thread Sander Elias
Hi Marko, I would put the search parameters in a service, and the search (including its results) in another one. You can then inject them in all the view's controllers that need them. As service are singletons, they keep their state. Regards Sander -- You received this message because you are

[AngularJS] Re: Angular app design questions: controllers, views and conditional transitions

2014-06-13 Thread Sander Elias
Marko, Do the search before you change the view, if the result is not according to your wishes, you can adapt de search paraemters in that view, if it's ok, change the view, and the results you already have will get displayed. (hence the 2 services!) Regards Sander -- You received this messa

[AngularJS] Re: View is not updating when countdown time has been reached

2014-06-14 Thread Sander Elias
Hi Telagrapic, You problem has nothing to do with $apply or $timeout. If you want to start a new timer, you need to reset the time your compare against, not the countdown counter. Regards Sander -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To

[AngularJS] Re: Get desktop notifications on change in status of a bug logged in database using angular js

2014-06-15 Thread Sander Elias
HI Satish, Yes, it can be done. At least if you transfer your application to an chrome-app . Perhaps other browsers have similar functionality, but then you have to add support each one off those. Also if you only need the notification part, that ca

[AngularJS] Re: AngularJS simple DataBinding Issue

2014-06-15 Thread Sander Elias
Hi Anshul, After you have changed your data, you need to tell prism to rerender its part. Regards Sander -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving e

[AngularJS] Re: Angular app design questions: controllers, views and conditional transitions

2014-06-15 Thread Sander Elias
Marko, Create a function in your controller that checks the result of the search service, and forward to the result view if ok, otherwise let the user know what he has to do, and stay within the same view. You can indeed trigger this function with an ng-click handler. Regards Sander -- You r

[AngularJS] Re: Angular get and set json data issue

2014-06-15 Thread Sander Elias
Justin, When learning angular (I suppose that is what you are doing?) it is a *really good idea* to *drop jQuery*, at least for the time you are getting to know angular. Also, you are trying to build a single page app right? navigating away in an login button is then also not the way to go. Re

[AngularJS] Re: How to load nested JSON URLs and display in a template

2014-06-15 Thread Sander Elias
Hi David, Well, I have no idea what those url’s return. That makes it hard to give a complete solution to your problem. {{ room.room }} {{ room.floor }} {{resolve(data) ; data.data|json}} in your controller you ca

[AngularJS] Re: AngularJS simple DataBinding Issue

2014-06-16 Thread Sander Elias
Hi Anshul, Once prism has run the {{data}} content of your original element is replaced by a prism rendered content. Simply calling the highlight function of prism, is just reredering the old content again. (prism replaces the angular binding!) In this case you can’t do what you want without b

[AngularJS] Re: Improve Angularjs performance by lazy loading accordion content

2014-06-16 Thread Sander Elias
Ho Fasil, Have a look at ng-if. If you use this to 'hide' the content of your tabs, it is taken out of the DOM (probably the cause of your problem) Regards Sander -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and

[AngularJS] Re: AngularJS simple DataBinding Issue

2014-06-16 Thread Sander Elias
Hi Anshul, Seems you have some more reading to do then ;-P What happens is, that once prism has replaced the html with the formatted code, it breaks the connection that angular needs. the {{data}} is tells angular, insert the content of data here, and show it. Prism breaks that link, and insert

Re: [AngularJS] Re: How to load nested JSON URLs and display in a template

2014-06-16 Thread Sander Elias
Hi David, Yeah, I have enough thoughts, some of them are even relevant to your problem :-P David, this is less common as you would think. You are missing the point that you can’t use raw JSON data in your view, you need to handle that first. Mostly this kind of stuff is handled in a template

[AngularJS] Re: The best way to use filter and ignore diacritics while do searching

2014-06-18 Thread Sander Elias
Hi Nomore, You need to make an lookuptable and replace all the characters in the string with versions without diacritics. then you can do the filtering on the strings without those. Keeping both versions of the sting enables you to display with, and search without them. Does that make sense?

<    2   3   4   5   6   7   8   9   10   11   >