[AngularJS] Restangular- Reset addResponseInterceptor() to default

2014-08-18 Thread Darin Hensley
I have this in my angular.module('main', []).config(): RestangularProvider.setBaseUrl("" + API_BASE_URI + "1.0/loadbalancers"); return RestangularProvider.addResponseInterceptor(function(data, operation ) { switch (operation) { case 'get': return data.load_balancer_data;

[AngularJS] AngularJS - select with zero(0) value

2014-08-18 Thread Nasir Mansoor Usmani
I want to filter records using text input and select input as show in example http://jsfiddle.net/nmusmani/gwnfkxmc/5/ Select options are: `[ {StatusID: 0, StatusDesc: "New"}, {StatusID: 10, StatusDesc: "Enabled"}, {StatusID: 30, StatusDesc: "InProgess"}, {StatusID: 70, StatusDesc: "Done"}

[AngularJS] How to open async calls triggered by a user in a new tab instead of a new window

2014-08-18 Thread leif hanack
Hi there, recently I had troubles to open a new tab instead of a new window when a user triggered an async action which should generate a PDF. The trick was to remember the reference to the new window and change the location of that window when the asynchron call completes. Here you can find

[AngularJS] Re: Server side validation error messages directive

2014-08-18 Thread KamBha
Hi Cesar, Can you describe what the error structure is for repeating values? For example, if you have this:- { "cars" : [ { "name" : "Ford", "type" : "4WD" }, { "name" : "Toyota", "type" : "4WD" } ] And the server side validation message is on the name of the second "car" element, how do you

Re: [AngularJS] Re: Server side validation error messages directive

2014-08-18 Thread Kamal Bhatt (personal)
I don't really want to use such old versions. I am interested in 1.2.x though. Thanks, I will take a look and let you know how well it works in 1.2.x. Also, I am still interested in know what I did wrong. Thanks. Kamal. > On 19 Aug 2014, at 4:07, Cesar Andreu wrote: > > I implemented a direc

[AngularJS] Updating two lists after ui-sortable drag and drop event.

2014-08-18 Thread Cody Scott
I'm using angular-ui-sortable to re-order items in a list. But I want to group items (modules) by bundle, which is just a collection of modules. In the demo there is a 'Re-order Bundles/Re-order Modules" button to switch between the re-order the diffe

Re: [AngularJS] Can you tell me what this routing code is doing?

2014-08-18 Thread Mark Volkmann
On Mon, Aug 18, 2014 at 2:53 PM, Jonathan Matthew Beck wrote: > I came into a project and found things like this in the routing: > > .when('/home', { > > templateUrl: 'partials/home.html', > > controller: 'HomeController as vm', > >

[AngularJS] ng-src ubuntu firefox

2014-08-18 Thread Zoltan Szalai
Hi, Any idea why the image doesn't show up in ubuntu/firefox31.0? http://plnkr.co/edit/r6wK2an76dxYft9wSzsd It seem to work in chrome, safari and also win7/firefox31.0. Thanks, Zoltan -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscrib

[AngularJS] Can you tell me what this routing code is doing?

2014-08-18 Thread Jonathan Matthew Beck
I came into a project and found things like this in the routing: .when('/home', { templateUrl: 'partials/home.html', controller: 'HomeController as vm', resolve: { init: ['dataService', func

[AngularJS] What is "init" doing in routing "resolve"?

2014-08-18 Thread Jonathan Matthew Beck
I came into a project and found things like this in the routing: .when('/home', { templateUrl: 'partials/home.html', controller: 'HomeController as vm', resolve: { init: ['dataService', func

Re: [AngularJS] Outer-directive and inner-directives

2014-08-18 Thread Eric Eslinger
Yeah, I'd say that's probably the situation. If the tooltips are being added dynamically in a later digest cycle as a result of an ng-repeat or ng-include, I'm pretty sure the table's postLink and controllers will both fire off first. It's something of a hack, but you could always do something lik

Re: [AngularJS] Outer-directive and inner-directives

2014-08-18 Thread alycklama
That's exactly what I thought, but unfortunately it is not working. table - controller table - preLink table - postLink tooltip - controller tooltip - preLink tooltip - postLink I would have expected the output below: table - controller tooltip - controller table - preLink tooltip - preLink tool

Re: [AngularJS] Re: ng-click handler called twice

2014-08-18 Thread Brian Sanchez
that helped a lot. thanks On Wednesday, May 14, 2014 3:47:39 PM UTC-4, Stephen Huey wrote: > > Ha, glad you got it worked out! > > Stephen > > > On Wed, May 14, 2014 at 2:37 PM, Bao Zhi Liu > wrote: > >> Stephen, you rocks. >> >> I tried to find the reason for many hours, but failed. I finally

[AngularJS] Re: Server side validation error messages directive

2014-08-18 Thread Cesar Andreu
I implemented a directive / service combo to do this. You can check out the repo here: https://github.com/cesarandreu/angular-server-form And I wrote a blog post on using it with Rails here: http://blog.cesarandreu.com/posts/form_validation_with_angularjs_and_rails It's easily extensible for usa

Re: [AngularJS] Custom SELECT element

2014-08-18 Thread Eric Eslinger
without specific code (make a plnkr.co mockup) to look at, I'll be generic in my advice. But my advice is, try using ng-if directives on your elements. I've done stuff like this element before, and it'll auto update in the digest cycle when view.showingThisElement changes. e On Mon, Aug 18, 2014

Re: [AngularJS] Outer-directive and inner-directives

2014-08-18 Thread Eric Eslinger
I've not needed to fiddle with that all that much, but my understanding is that the inner-directives should all be instantiated and linked before the outer-directive's link function. http://www.bennadel.com/blog/2603-directive-controller-and-link-timing-in-angularjs.htm Theoretically, you ought t

[AngularJS] Problems understanding Angular Models: $viewValue & $modelValue

2014-08-18 Thread TekTimmy
Hi, I'm working with angularjs for some weeks now, and I don't get what the angularjs designers thought when designing the $viewValue and $modelValue functionality from the ngModelController . *my angular application:* *index.htm

[AngularJS] Re: How to get data from $http on the page?

2014-08-18 Thread Bruno Finger
Thanks Eric, injecting the scope helped do it. I actually tried that before but I couldn't see the results on the page because I also inverted my *tr* and *td* tags (so dumb mistake), which made the table not render. After I noticed it and tried again with the scope, as you suggested, it worked!

[AngularJS] Outer-directive and inner-directives

2014-08-18 Thread alycklama
I'm having some difficulties grasping some basic angular flows and techniques. Is it possible for the outer-directive to "know" when the inner-directives have been finished? I'm asking this because I noticed it's relatively slow to call "element.tooltip()" on a large set of items in

Re: [AngularJS] How to get data from $http on the page?

2014-08-18 Thread Eric Eslinger
The canonical approach would be to inject $scope into your controller, and in the success (I prefer .then personally, as that's the promise standard, but they're equivalent) route, do something like $scope.dataList = data, or whatever part of the response data you want to use. Alternatively, you c

[AngularJS] How to get data from $http on the page?

2014-08-18 Thread Bruno Finger
Hello, I am learning AngularJS and I have encountered an issue I can't pass by. I am writing a small test page that retrieves some data from a RESTful API I have previously written. I can successfully retrieve this data from Angular, but I can't seem to find a way to display this data on the

[AngularJS] Re: Notifying $viewChangeListener subscribers on ngModel change.

2014-08-18 Thread Alex Popov
Maybe you should run manual $apply/$digest cycle? -- 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] Custom SELECT element

2014-08-18 Thread Alex Popov
Hi guys, I have some problem with creating custom select. I have three views of select: Enabled for edit, Disabled for edit, and Disabled view. The difference between last two disabled forms is: 1) Show disabled "Choose.." 2) Show disabled "None" In my templates i have "Choose" like default val

[AngularJS] Notifying $viewChangeListener subscribers on ngModel change.

2014-08-18 Thread Daniel Ortega
Hi everyone, I've just run into a problem when developing a custom directive using the ngModel Controller. I'm adding a custom function to the $viewChangeListeners list so I get notified whenever the value changes, and everything was working fine until I manually changed the value of the ngMod

[AngularJS] How to display the price and quantity from database in angularjs+javafunctionality

2014-08-18 Thread raju reddy
Hi , Working on angular+javarelated project,I need to the get the price and quantity of the product selected by the user,Can some one give suggestions on this.Iam trying on Broadcast and on functions on scope -- You received this message because you are subscribed to the Google Groups "Angula

[AngularJS] smart-table v1.0.0 ... or a brand new module

2014-08-18 Thread lorenzofox3
Hello community, I went through a massive rewrite of smart-table this week end and the global idea has changed quite a lot This is no longer configuration based but declarative ! You declare a top level attribute on the table which will provide an API accessible to sub directive (plugins) (work

Re: [AngularJS] directive attribute naming convention

2014-08-18 Thread Wallace Turner
>So using camelcase is a bad idea there. So then accept ngBind or ngbind. My guess is: ngBind - goes against the convention to use lower case for html [1] ngbind - not as readable The jury still seems to be out on this one with regard to camelCasing in element/attribute names thus I assume the

Re: [AngularJS] directive attribute naming convention

2014-08-18 Thread Eric Eslinger
I'm fairly sure that HTML is case insensitive. You can have or . So using camelcase is a bad idea there. That said, it definitely is a gotcha, especially when you define a directive on your own. E On Aug 18, 2014 6:03 AM, "Wallace Turner" wrote: > What is the reasoning behind using denormalizi

[AngularJS] Re: Angular Kendo

2014-08-18 Thread Aaron Lind
After some searching, it appears Kendo on it's own handles some of the formatting needs that angular-kendo usage does not. Below is an article that discusses the .css file need and I've included the code as well. For the header to remain static the .header portion of the .css file is needed,

Re: [AngularJS] Re: Assigning ng-repeat filtered result set only works for nested property names

2014-08-18 Thread Torsten Uhlmann
Hi Sander, I get what you're saying. This ng-repeat is not part of another ng-repeat and I also didn't find another surrounding directive that does create its own scope. I could be wrong though, need to check more thorough. However your explanation makes sense. Thanks, Torsten. 2014-08-18 14:

[AngularJS] directive attribute naming convention

2014-08-18 Thread Wallace Turner
What is the reasoning behind using denormalizing the directive name when using it in the html document? For example, ngBind can be defined in the following formats [1]: Why not also (or only): Of course one can shout RTFM but this seems like a gotcha from the very firs

[AngularJS] Re: Assigning ng-repeat filtered result set only works for nested property names

2014-08-18 Thread Sander Elias
Hi Torsten, Assuming from your code, this code is part of another ng-repeat right? (or at least the child of another directive that creates a new scope!) Every repeated item has its own new scope. You can't access a child-scope property from the controller. However, objects are linked by referen

[AngularJS] Re: Issue with model update

2014-08-18 Thread Sander Elias
Hi Cristian, Hmm, you don’t need a $scope.$apply in there. try this: $scope.buy = function () { var bought = { ProductID: $scope.prodID, UnitPrice: $scope.unitPrice, Quantity: $scope.quantity, Discount: $scope.discount, OrderID: $scope.OrderId }; $.post('Sales/SaveOrderDetail',

[AngularJS] Assigning ng-repeat filtered result set only works for nested property names

2014-08-18 Thread Torsten Uhlmann
Hi, I hope the title of the post is not too misleading... I tried to access the filter result created inside an ng-repeat inside my controller as demonstrated in this fiddle: http://jsfiddle.net/jvandyke/EAbks/2/ {{item}} Doing it like this does allow my to access the "filteredItems" var insi

[AngularJS] How to evalute the received message status through jasmine spy to an angular controller and evaluating URL redirection process ?

2014-08-18 Thread Viranga
I have a problem on how to use jasmine spy objects to test controllers that depends on a service and I have been tussling with this issue for some time now as I am quite new to AngularJS based developments. Could you please suggest what changes should be made in order to implement this test c

[AngularJS] Re: Issue with model update

2014-08-18 Thread Christian Nwamba
> > > It sound as if you are updating your data outside angular. That is not a > problem, but you need to $scope.$apply your update then! > > > Yeah I think I am. This is my code $scope.buy = function () { var bought = { ProductID: $scope.prodID, UnitPrice: $scope.unitPrice , Q

[AngularJS] Re: Issue with model update

2014-08-18 Thread Sander Elias
Hi Cristian, It sound as if you are updating your data outside angular. That is not a problem, but you need to $scope.$apply your update then! 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] Adding two ng-model to a textbox

2014-08-18 Thread Christian Nwamba
On Saturday, August 16, 2014 5:45:46 PM UTC+1, Eric Eslinger wrote: > > Not really (I don't think so, at least). I'm not sure I understand why wou > would want to do that either - if the same value's going into two different > spots (name and ID), just pick a name for the variable and use it el

[AngularJS] Issue with model update

2014-08-18 Thread Christian Nwamba
I have a model table that is updated once i send and receive data to the server using JSON. The problem is that the table does not update immediately instead it updates an earlier one when i add a new record E.G: if i add row 1 to the database, the table doesnt update but when i add row 2, row 1 no

Re: [AngularJS] Re: {{artist.name}}

2014-08-18 Thread roberta sander
yes i've replace that onclick event code with the route and it works so the issue is solved thank you bye Il giorno lunedì 18 agosto 2014 00:04:23 UTC+2, Eric Eslinger ha scritto: > > It would help if you posted a plunker for your code that doesn't work: > > http://plnkr.co/ > > Getting a minimum