[AngularJS] Re: Directive link function end

2014-01-21 Thread Ziv Glazer
Heres some code so u could better understand the problem Heres the map directive controller code: { link: function(scope, element, attrs) { .. This function is being exectued asynchronously by this controller of the map directive, so the rest of the code of the this controller

[AngularJS] Convert DurandalJS app to AngularJS?

2014-01-21 Thread James Barrow
Hi all, Has anyone tried to convert an existing DurandalJS application to AngularJS? I'm considering it as a possibility should Durandal ever come under a commercial license in the future, and just interested in people's experiences. Thanks, James -- You received this message because you

[AngularJS] Re: filtering ng-repeat by multiple select tag including multiple data type.

2014-01-21 Thread Alon Nisser
assuming the other ng-model is search.weapon wouldnt this work?: li ng-repeat=item in items | filter: search.attribute | filter: search:weapon{{item.name}}/li Did you try it? On Saturday, January 18, 2014 12:19:31 PM UTC+2, Shunsuke Hakamata wrote: Hello, I want to filter list by this

[AngularJS] Re: Directive link function end

2014-01-21 Thread Sander Elias
Hi Ziv, Looks like a prime candidate for an promise to me! create a promise, in your initlayer you can resolve the promise when it is done. then in the calling controller you can do something like: functionthatputsatargetonthemaplayer().then(...) Regards Sander -- You received this message

[AngularJS] Re: ui-router, css...state-change

2014-01-21 Thread Alon Nisser
A plunker would be helpful On Sunday, January 19, 2014 7:31:21 PM UTC+2, Daniel Jansson wrote: I am using ui-router and I have an abstract landing-page with two subviews - login and register. The parent state has a ng-include for the header. Acss error occurs when I am changing from one

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

2014-01-21 Thread Alon Nisser
Can you specify what is the exact problem with this approach? This approach is generally correct. But from looking at your code I think the check if isAuthentecated would fail since the service doesn't run the check. I think you should add a `setter` and `getter` methods to this service,

[AngularJS] Re: Why isn't my isolated scope working?

2014-01-21 Thread Fordio
Looks like I get the gold star myself! The controller needs to be on an ancestor element to the directive in order that the scope properties come through. Is this a bug? On Tuesday, 21 January 2014 10:23:10 UTC, Fordio wrote: I've been trying for ages and cannot work out what is wrong here.

[AngularJS] Re: Why isn't my isolated scope working?

2014-01-21 Thread Sander Elias
Hi Fordio, Because the link function gets access to the transcluded scope. This is not the isolate scope. actually the isolate scope is a sibling of the transcluded scope. Regards Sander -- You received this message because you are subscribed to the Google Groups AngularJS group. To

[AngularJS] Re: request method $http.get error

2014-01-21 Thread Mike Gledhill
Have a look at this page. It shows how to get Angular to successfully call GET Web Services. http://better-inter.net/enabling-cors-in-angular-js/ (It was a life-saver for me..!) Mike http://www.mikesknowledgebase.com On Tuesday, May 15, 2012 12:42:36 AM UTC+2, Eduardo Burnay wrote:

[AngularJS] Re: ng-html-bind causing $sanitize:badparse with special character ''

2014-01-21 Thread Sander Elias
Hi Patrick, Well, your sting is not HTML-'safe', and can not be parsed. If you need to include and in a string you want parsed, you have to escape those. There are a few other things that needs escaping too, but those are the most important ones. you need to replave the with lt; and the

[AngularJS] Using Typescript and AngularJS

2014-01-21 Thread Todd Adams
Below is a simple implementation of pubsub as an angular service. I have done this as a way to evaluate using Typescript to develop Angular modules. The idea here is to have a class (Pubsub) that contains all of the logic of this service, and can be newed up in unit tests. This allows test of

[AngularJS] Re: Using Typescript and AngularJS

2014-01-21 Thread Sander Elias
Hi Todd, I have no actual experience with typescript. However, are you aware of this talk http://www.youtube.com/watch?v=u6TeBM_SC8w? I think it answers a few of your concerns. Regards Sander -- You received this message because you are subscribed to the Google Groups AngularJS group. To

[AngularJS] Re: Triggering a Directive

2014-01-21 Thread Todd Adams
I create directives that use a publish/subscribe pattern. They subscribe to a data channel, and when data is there, they populate a view model. In this way they are not concerned with how the data get's there, just what to do when it is. Here is a sample of the link function: _link =

[AngularJS] Re: ng-repeat with no sort? How?!

2014-01-21 Thread Evgeniy Tkachenko
Henrique Recidive not work for me http://jsfiddle.net/er52h/2/ -- 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] on click help

2014-01-21 Thread Philip Sivyer
Hello - newbie Using Angular syntax I am trying to get the onclick=dashboard1() in my code to use the selected_report.name feed. My Code !doctype html html ng-app head script src= https://ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular.min.js; /script titleMY DASHBOARDS/title

Re: [AngularJS] Re: ng-html-bind causing $sanitize:badparse with special character ''

2014-01-21 Thread Patrick Bertolla
Now that you say it, it sounds obvious. I was a little bit confused, since I used the directive ng-html-bind-unsafe (Angularjs 1.0.4) and there it worked. I thought ng-html-bind workes the same way but the name already tells me that it does not xD. Thank you for the fast reply. 2014/1/21 Sander

Re: [AngularJS] Re: ng-html-bind causing $sanitize:badparse with special character ''

2014-01-21 Thread Sander Elias
Patrick, You're welcome. The reason the old version did work, was due to the fact, that the innerHTML got set without any kind processing. Most browsers can handle very malformed html. The new $SCE system does need to parse the string, to make sure there is nothing in there that can compromise

[AngularJS] ng-options with array of objects?

2014-01-21 Thread Stephen Friedrich
I cannot get ng-options to work: My model that I'd like to update via a drop down is wifiSettings = { channelNumber: 2, ... } and the available options should come from an array like availableChannels = [ { number: 1, frequency: 2412, maxTransmitPower: 20 }, {

[AngularJS] Re: New DI framework

2014-01-21 Thread Christopher Caplinger
According to Vojta, that di.js repo is the current, up-to-date (but work-in-progress) repository. The examples he showed off at ng-conf were not angular-specific, as you noticed, so I'm pretty sure this is still a little too young to be used with the current state of angular. Keep an eye on

[AngularJS] Re: Address one instance of a directive

2014-01-21 Thread Sander Elias
Hi Ttmt, Apart from the fact that your code probably calls scope.$init twice it looks ok to me. Can you put up a plunk or fiddle demonstrating the problem you have at hand? Regards Sander -- You received this message because you are subscribed to the Google Groups AngularJS group. To

[AngularJS] Re: Address one instance of a directive

2014-01-21 Thread ttmt
Hi Sander i don't actually have a problem with the code but I don't know how to address separate instances of the directive. If I use the directive on two separate html elements to create two separate scroller how can I address the separate scrollers. Surely I don't need a directive for each

[AngularJS] Re: on click help

2014-01-21 Thread Philip Sivyer
Hi - thanks for the reply Below is my modified code - but due to my lack of understanding can't get it too work?? !doctype html html ng-app head script src= https://ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular.min.js; /script titleMY DASHBOARDS/title /head hr br div

[AngularJS] Re: Address one instance of a directive

2014-01-21 Thread ttmt
I'm using the directive 3 times in the html to create 3 separate scrollers. I need to address these's scrollers separately in the directive. On Tuesday, January 21, 2014 4:33:49 PM UTC, Sander Elias wrote: I see, Well, just use it twice, or more. However, the underlying plugin needs to

[AngularJS] Filters - speed and size of result set

2014-01-21 Thread Tom Leadbetter
Hi all We have a large data set, potentially several thousand results, though just currently a maximum of about 500. We have paging, ordering and filtering (powered by checkboxes). We have noticed that there is an ever so slight delay between selecting the checkbox and/or checkbox label and

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

2014-01-21 Thread telagraphic
I tried updating the plunker with those files, but it is still erroring and I can't tell what the error is! Here is a gist that simplifies what I'm trying to do. When a checkbox is checked true, then I want the other checkboxes in the list to disable. When the checked checkbox is unchecked,

[AngularJS] Re: Filters - speed and size of result set

2014-01-21 Thread Tom Leadbetter
Sorry, the plunker has reset itself. I'll sort it again... On Tuesday, 21 January 2014 17:28:40 UTC, Tom Leadbetter wrote: Hi all We have a large data set, potentially several thousand results, though just currently a maximum of about 500. We have paging, ordering and filtering (powered

[AngularJS] Re: Filters - speed and size of result set

2014-01-21 Thread Tom Leadbetter
ok, it's back now http://plnkr.co/edit/HWDtfmUzWcrqux762Fmu?p=preview On Tuesday, 21 January 2014 17:28:40 UTC, Tom Leadbetter wrote: Hi all We have a large data set, potentially several thousand results, though just currently a maximum of about 500. We have paging, ordering and filtering

[AngularJS] Re: Address one instance of a directive

2014-01-21 Thread Sander Elias
You need to access to other ones from inside either one? Or what do you need exactly? -- 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: Different animation with ng-view and ng-animate per route

2014-01-21 Thread Andreas Larsson
Hello Yair! This was really cool, great job on this! Den söndagen den 12:e januari 2014 kl. 18:57:59 UTC+1 skrev Yair Haimovitch: Hi, I wrote a small plugin to handle that: https://github.com/yairhaimo/angular-route-animation-manager You can check the source code, it's very short.

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

2014-01-21 Thread Steve Lorimer
Your plunker is still missing half your code and the gist is just a cut and paste of some parts of the code in your original plunker. I'm sure you'll get a lot more help if you take the effort to create a working example. All that said, all you need to do is save the current winner's id

[AngularJS] Re: filtering ng-repeat by multiple select tag including multiple data type.

2014-01-21 Thread Shunsuke Hakamata
Hi Alon, Thanks for your reply! I wanted to create search object as the demo and use only one filter. I made my solution in JSFiddle. http://jsfiddle.net/HAKASHUN/zqgrA/ 2014年1月21日火曜日 18時23分54秒 UTC+9 Alon Nisser: assuming the other ng-model is search.weapon wouldnt this work?: li

[AngularJS] I use Google Feed API with AngularJS but it dosen't work!

2014-01-21 Thread Randy
html ng-app=feed head script type=text/javascript src=bower_components/angular/angular.min.js/script script type=text/javascript src=bower_components/storedb/storedb.js/script script type=text/javascript src=https://www.google.com/jsapi;/script script google.load(feeds,1) var ggrss =

[AngularJS] I use Google Feed API with AngularJS but it dosen't work!

2014-01-21 Thread Randy
html ng-app=feed head script type=text/javascript src=bower_components/angular/angular.min.js/script script type=text/javascript src=bower_components/storedb/storedb.js/script script type=text/javascript src=https://www.google.com/jsapi;/script script google.load(feeds,1) var ggrss =

[AngularJS] What is the difference between ['$httpProvider'], $http, $httpPovider etc

2014-01-21 Thread Alex Tan
Sometimes I see code like .config(['$httpProvider', function($httpProvider) { sometimes it is angular.module('someModule', []) .factory('someResource', function ($http, ) { so I see few scenarios: including in square brackets including $http and other dependencies including $httpProvider

[AngularJS] How do you use dynamic ng-show values inside a directive template?

2014-01-21 Thread Ken Egervari
I am learning angular, and I am trying to reduce some code that it takes to do some common things, like display error messages, by using angular directives. One directive I would like to create is like this: error-message name=paymentPlanForm.position error=required This field is

[AngularJS] Returning result of factory using angular-rails-resource.

2014-01-21 Thread Stuart Clove
If I have a factory where I want to return all tasks: App.factory('Task', function(TaskResource) { return { all: function() { TaskResource.query().then(function(results) { return results; } } }; }); and I try to use it in the TasksController:

[AngularJS] Re: Returning result of factory using angular-rails-resource.

2014-01-21 Thread Justin Walsh
Try: App.controller('TasksController', function(Task) { $scope.tasks = Task.all(); }); On Wednesday, January 22, 2014 7:34:25 AM UTC+2, Stuart Clove wrote: If I have a factory where I want to return all tasks: App.factory('Task', function(TaskResource) { return { all: function() {

[AngularJS] Re: Returning result of factory using angular-rails-resource.

2014-01-21 Thread Stuart Clove
Sorry, that was a mistake on the post. Thank your of the suggestion though. On Tuesday, January 21, 2014 10:47:38 PM UTC-7, Justin Walsh wrote: Try: App.controller('TasksController', function(Task) { $scope.tasks = Task.all(); }); On Wednesday, January 22, 2014 7:34:25 AM UTC+2, Stuart

[AngularJS] Re: Returning result of factory using angular-rails-resource.

2014-01-21 Thread Justin Walsh
Can someone help me understand why this is happening? Thanks. Because your factory's all function is not returning anything (i.e. it returns undefined). *TaskResource.query()* returns a promise. When the promise is resolved the 'anonymous' function is called. This is not the same function as

[AngularJS] Re: I use Google Feed API with AngularJS but it dosen't work!

2014-01-21 Thread Sander Elias
Hi Randy, With questions like those, you really should build an plunk or fiddle do demonstrate your problem. As far as I can see it now, it is wrong in the ggrss function. It looks like it is not returning what it should. Regards Sander -- You received this message because you are subscribed

[AngularJS] Re: How do you use dynamic ng-show values inside a directive template?

2014-01-21 Thread Sander Elias
Hi Ken, For problems like this you really should build a plunk or fiddle! You guess is right, it is a problem with scope, or something else! ;) How about creating a function on your scope that does the checking and use that in your template? Regards Sander -- You received this message

Re: [AngularJS] What is the difference between ['$httpProvider'], $http, $httpPovider etc

2014-01-21 Thread Mauro Servienti
.config(['$httpProvider', function($httpProvider) { At config time you cannot depend on anything other than providers. In general the syntax ['name', function] is to express dependency that survives to magnification. The AngularJS Dependency Engine, due to the way JavaScript does not work, in

[AngularJS] Re: Filters - speed and size of result set

2014-01-21 Thread Sander Elias
Hi Tom, The way you do this isn't the most efficient way, Your result data get's piped trough 5 filters. A couple of them need to traverse your entire data-set. This is ok(ish) for a small data-set, but if it grows this becomes a serious lag. For myself I would replace all those filters with