[AngularJS] Re: i want to sort data between two dates?

2016-02-03 Thread Luke Kende
you are sorting the String, convert to Date object first : //return piece return function(records, from, to) { var fromDate = new Date (from ) var toDate = new Date( to ) return records.filter(function(record) { return new

[AngularJS] Re: New route doesn't allow me inject custom services in a separate file.

2015-06-13 Thread Luke Kende
Sounds like it's related to these issues with new angular router: https://github.com/angular/router/issues/258 https://github.com/angular/router/issues/192 On Friday, June 12, 2015 at 3:59:41 PM UTC-6, Daniela Meneses wrote: Hi guys, just trying to figure out how can I have services in

[AngularJS] Re: using $watch within another $watch

2015-06-13 Thread Luke Kende
Yeah, this is hard to decrypt. You might want to use a plunkr to illustrate. That said... it be easier to have separate watches and a new local variable to know the difference. directive.link = function($scope, element, attributes) { var makepubpriHidden = false;

Re: [AngularJS] Re: Clean table construction and DOM-manipulating directives

2015-05-15 Thread Luke Kende
... sort of thing to display it. If one of the entries had HTML elements in it, they wouldn't render, which I gather is a very reasonable security precaution; but it looks like this approach circumvents that nicely. Thanks for unsticking me! Bartholomew On Thu, May 14, 2015 at 12:34 AM Luke

[AngularJS] Re: Clean table construction and DOM-manipulating directives

2015-05-14 Thread Luke Kende
First of all, I'd work on one directive concept at a time and then build up to complexity as appropriate. Your ng-repeat does not have to be outside the directive but can be in the directive's template, and instead pass in the data to the table's directive. You can then have custom directives

Re: [AngularJS] Re: How does app.config() work?

2015-05-02 Thread Luke Kende
There should only be one config(). You can mass multiple dependencies into it... that's what the Array[] syntax is. Notice the array passed into config() has many string-names to reference each provider needed, then the variable names are passed as arguments into the function. So anytime you

Re: [AngularJS] Re: How does app.config() work?

2015-05-02 Thread Luke Kende
config blocks for code clarity. Regards sob., 2.05.2015 o 20:44 użytkownik Luke Kende luke.ke...@gmail.com napisał: There should only be one config(). You can mass multiple dependencies into it... that's what the Array[] syntax is. Notice the array passed into config() has many string-names

[AngularJS] Re: How does app.config() work?

2015-04-29 Thread Luke Kende
You don't, it will make the connection for you. Just put ng-view somewhere in the html below the navbar, the link click will be caught by angular, then look at your config and decide what template/controller to load at the point of ng-view element. (consider using html5mode:

[AngularJS] Re: overriding tabset's tab select/click event

2015-04-15 Thread Luke Kende
If you are using Angular UI Bootstrap there is a disabled attribute which you can set for each tab you want disabled: http://angular-ui.github.io/bootstrap/#/tabs On Wednesday, April 15, 2015 at 6:22:37 AM UTC-6, yogesh natu wrote: HI, I am having 3 tabs, having forms in each. I am looking

[AngularJS] Re: Directives are my major fear in angular

2015-04-15 Thread Luke Kende
I'd say start small and then build up to the more complex directives. Here's the simplest one I've built. It only requires a returning an object with a linking function. Following the syntax pattern, all you have to worry about is that the linking function is called when angular compiles

[AngularJS] Re: why datepicker doenst open with ng-click='opened=true'

2015-04-15 Thread Luke Kende
Could also be due to the primitive reference... try putting your boolean on an object: scope.picker = { value: '', opened: false } input type=text class=form-control datepicker-popup=dd.MM. ng-model=picker.value is-open=picker.opened min-date=minDate max-date='2015-12-31'

[AngularJS] Re: I have an app template that needs page-title parameter, but how?

2015-04-15 Thread Luke Kende
Just as plain-ol-javascript would use window.document.title... angular has a safe reference to $window $window.document.title Just inject it into your controller to use it. BUT... you're example looks like a different question. You just need to keep up with a reference to the current nav's

Re: [AngularJS] ng-src not working in ng-bind-html

2015-04-14 Thread Luke Kende
Are you trying to replace complete blocks of html? Then yes, use ng-include as Caitlin recommends. For ng-src is interpolated not, bound to a variable... the proper way to change the source in your case should be: img ng-src={{imagevar}} This is advantageous because you can change, parts of

[AngularJS] Re: Enable/Disable Save button according to changes in Form(DOM) data

2015-04-14 Thread Luke Kende
Well, you could bind each form field to a scope object and $watch the object for changes scope.myForm = { field1: 'initial_value', field2: null, field3: false } scope.$watch('myForm', function(newFields, oldFields) { if (newFields.field2.length) { scope.buttonDisabled = true; }

Re: [AngularJS] Re: Minification of angular files

2015-03-17 Thread Luke Kende
Personally use Codekit (Mac) for both minification and sass compilation. It may be simpler to start with for you, maybe not, but throwing out something else to offer. On Tuesday, March 17, 2015 at 5:13:30 AM UTC-6, Volodymyr Stolyarchuk wrote: yes, it is possible and tools like gulp or grunt

[AngularJS] Re: ngResource.query - Problems sending complex parameters

2014-12-10 Thread Luke Kende
I almost know enough to answer this, but can at least point out some direction. First, have you tried a JSON string as opposed to sending an object. conditions: '{age: { $gt: 30 } }' Second, are you sure the server cannot decoded the escaped characters? I have been able to handle both cases

Re: [AngularJS] Re: Defining a resource URL globally.

2014-09-12 Thread Luke Kende
) for future DB requests (via REST) from my factories. On Thursday, August 28, 2014 2:06:03 AM UTC-4, Luke Kende wrote: $watch in app.run and broadcast event to controllers, you'll need some loading screen. It's timing, you control that by not letting things execute until they are ready. You can also

[AngularJS] Re: Defining a resource URL globally.

2014-08-28 Thread Luke Kende
$watch in app.run and broadcast event to controllers, you'll need some loading screen. It's timing, you control that by not letting things execute until they are ready. You can also wait until the value is present before bootstrapping angular if you prefer. On Wednesday, August 27, 2014

[AngularJS] Re: code design advice needed for managing 2 different lists

2014-07-29 Thread Luke Kende
For these sort of tasks I'd recommend underscore.js. Either diff() or filter() http://underscorejs.org/. Even if you use a directive, you have to write the logic to perform the task, but no, don't use a directive, write smart functions and use cool tools like underscore. Then if you are using

[AngularJS] Re: Fetching app configs from remote url

2014-05-29 Thread Luke Kende
How about loading a script tag in your html head that points to a remote javascript file? If you need something before angular bootstraps, then you'll need to accomplish it outside of angular. On Thursday, May 29, 2014 8:46:30 AM UTC-6, Joberto Diniz wrote: In my project, I need several

[AngularJS] Re: how to use jquery inside partials

2014-05-29 Thread Luke Kende
Don't try to mix jquery in like this. Learn how to use directives. On Thursday, May 29, 2014 3:23:06 AM UTC-6, Daniel Lopez wrote: Hi, I'm trying to to use some jquery inside a partial. what I want to do is a .slideToggle() of a div, inside a partial. this is my script

[AngularJS] Re: href link to route with params

2014-05-29 Thread Luke Kende
If you are using $locationProvider.html5Mode(true) then you don't need to put the anchor tag in there... still it seems that {{lang}} is not interpolating so you may have a scope issue. On Tuesday, May 27, 2014 3:57:20 PM UTC-6, Joberto Diniz wrote: I don't follow.. Tried:

[AngularJS] Re: ng-select with default values and overwrite of those values when event is triggered.

2014-05-29 Thread Luke Kende
ng-repeat just acts on the scope array (or object) so to overwrite values, just update the scope reference. On Tuesday, May 27, 2014 6:50:50 AM UTC-6, Stathis Gaknis wrote: I have an ng-select. Initially the select - options are populated from the server with a foreach. Then on an event

Re: [AngularJS] Re: view controller $scope.$on watch function not working...

2014-04-20 Thread Luke Kende
So, here's what I am understanding about your order of events, simplest scenario... 1. User comes to home page and is not logged in therefore sees Login form. 2. User enters credentials and clicks login, which let's say is successful, so factory method sets it's local isLoggedIn value to true and

Re: [AngularJS] Re: view controller $scope.$on watch function not working...

2014-04-20 Thread Luke Kende
() }); On Sunday, April 20, 2014 11:02:00 PM UTC-4, Luke Kende wrote: So, here's what I am understanding about your order of events, simplest scenario... 1. User comes to home page and is not logged in therefore sees Login form. 2. User enters credentials and clicks login, which let's say is successful

[AngularJS] Re: item in Items happy problem

2014-04-19 Thread Luke Kende
Change to: $scope.Items = []; //no curly braces - this is an empty array, no need to define an empty object On Friday, April 18, 2014 3:09:42 PM UTC-6, Leonardo Alfonso Tapia Delgado wrote: Hi, i have a problem with *ng-repeat*, in the view is rendered a default value {}, ¿How I can

[AngularJS] Re: Distinguish between bound and unbound forms

2014-04-19 Thread Luke Kende
Yeah, have not heard of bound form before, but it make sense whatever you want to call it. More abstractly, I'd call it maintaining state... for your form. I have a similar case where a user selects values, can go away and come back to the same page. I use a service to maintain state

[AngularJS] Re: Can I create an HTML email from an Angular form?

2014-04-19 Thread Luke Kende
Angular works in the browser, not on the server, so you aren't going to be able to use angular to get the generated html going into your email. But yes, you can post the input data from the input form by using ajax via $http in your controller to asp.net page that simply captures the data,

[AngularJS] Re: Bad argument error on Android 2.3

2014-04-19 Thread Luke Kende
I've seen this before on other browsers (IE). For me, it meant a javascript resource is failing to load, or is generating an error that worked in other browsers. You need the equivalent of the developer console on that browser in Android to see what's happening if this is the case. I could

[AngularJS] Re: Proper way dealing with SSO (simplesamlphp) in angular?

2014-04-19 Thread Luke Kende
Don't know simpleSamL but I know that since we already used an old-school post form in drupal, we just redirect users who are not logged in there. Then php sets the cookie, then we redirect back to the angular app if need be (a url param determines this). Once Angular is loaded we can verify

[AngularJS] Re: How to find which controller a specific data binding value is coming from

2014-04-18 Thread Luke Kende
Sounds like you are chasing your tail :} I don't see that the $scope identifies it's controller. The fact that your example doesn't use the dot syntax like item.value, makes it more likely to be the immediate controller. You can access the scope variable:

[AngularJS] Re: angularJS parsing xml problem beanJSON

2014-04-18 Thread Luke Kende
http://rabidgadfly.com/2013/02/angular-and-xml-no-problem/ On Thursday, April 17, 2014 8:04:10 AM UTC-6, Dude wrote: Hi All, I have an xml file like this : Response StatusOK/Status Books Book id1/id /Book Book id2/id /Book /Books /Response it is

Re: [AngularJS] Re: view controller $scope.$on watch function not working...

2014-04-18 Thread Luke Kende
=preview I can't get the AuthFactory to work. I tried to add a button to console.log when I click but it doesnt do anything On Friday, April 18, 2014 1:45:29 AM UTC-4, Luke Kende wrote: This could be a timing thing. Are you sure your listener ($scope.$on) in client controller is loaded

Re: [AngularJS] Re: view controller $scope.$on watch function not working...

2014-04-18 Thread Luke Kende
this will solve the issue...I HOPE! On Friday, April 18, 2014 4:39:41 PM UTC-4, Luke Kende wrote: Well, without seeing the code, it was an option that the broadcast was happening before the child controller had registered the listener. Now that I see the code, that is not the case. So I added

Re: [AngularJS] I am a JavaSwing coder, and for a new project, I am facing to choose backbone or Angular, so just kindly ask which one is easier for me to learn with swing background

2014-04-18 Thread Luke Kende
I had a similar experience to Billy. I tried backbone and many other frameworks (http://todomvc.com/) out there and then Angular was like magic with it's 2-way data-binding. Imagine having to go back to managing your memory in C from Java, backbone is a lot of grunt work. I agree if you

[AngularJS] Re: directive design: pass through input attributes?

2014-04-18 Thread Luke Kende
- You could use dynamic patterns: http://stackoverflow.com/questions/18900308/angularjs-dynamic-ng-pattern-validation - You could define your patterns in the directive template and then specify by another attribute like type: editable type=username value=userr.name/editable

[AngularJS] Re: Separating functionality of a directive?

2014-04-17 Thread Luke Kende
I agree to separate them out into separate directives, which makes then easier to manage and makes them portable. Making them all work together may be a bit trickier, but it can be done. I have several directives used for inputs to add the functionality I need, like: select-on-focus (selects

[AngularJS] Re: Directive Load Lazy

2014-04-17 Thread Luke Kende
Sounds like you need to ensure that jquery and autocomplete plugin are loaded in your index file before angular script refernces. Why lazy load? Also, check that iElement is the full jquery reference you think it is at the time the directive loads: app.directive('ngAutoComplete',

[AngularJS] Re: Using a directive to prevent other directives to execute

2014-04-17 Thread Luke Kende
Personally, I would approach the problem a different way all together. Trying to intercept the click and stop propagation sees hack-ish. No? Other approach ideas: - put a flag on rootScope defining whether the user is logged in or not and reference it in the logic functions like ng-click or

[AngularJS] Re: view controller $scope.$on watch function not working...

2014-04-17 Thread Luke Kende
This could be a timing thing. Are you sure your listener ($scope.$on) in client controller is loaded at the time of the broadcast? Another console.log just before the registration may help you see if that's the case. I don't believe that main as parent would override the child controllers

Re: [AngularJS] Re: Advice hooking things up

2014-04-04 Thread Luke Kende
I have a degree in CS (not that comparing penis sizes here matters :), but Javascript is a different beast. If you want to use arrays like dictionaries (which we don't call them that in js - sounds like python), be sure to understand that an email address as an index is not a great idea. Here's

Re: [AngularJS] Re: Extending a directive

2014-04-03 Thread Luke Kende
Yes you can use another directive to do it, but timing of the wijmo directive's rendering is the challenge. You'd have to create a $watch function do you know when their directive has created the element and then modify it with jquery in your directive. Does that make sense? On Thu, Apr 3,

[AngularJS] Re: Angular way for disabling an option in a combo

2014-04-03 Thread Luke Kende
I was able to get it done with a solution on SO: http://stackoverflow.com/questions/16202254/ng-options-with-disabled-rows On Thursday, April 3, 2014 10:31:28 PM UTC-6, Sander Elias wrote: Hi Santiago, Sure!. If you build a plunk, I will take a look at it. I don't believe it can be done

[AngularJS] Re: Factory function executing with out form submit

2014-04-03 Thread Luke Kende
Not sure why you are using type=submit here since ultimately your are going to authenticate via $http but, that issue aside, you are setting your login to the result of calling the authenticate function hence as soon as the controller is loaded it is executing the function. Try this:

[AngularJS] Re: Advice hooking things up

2014-04-03 Thread Luke Kende
I have to admit, it's hard to follow what you are trying to do. Have you spent much time understand Javascript object notation (JSON)? It looks like the core of your difficulty is understanding effective data structures. Also, if you can create a plunker to demonstrate, that makes it easier

[AngularJS] Re: giving $get,$update,$query when iterating JSON object at client side;.

2014-03-28 Thread Luke Kende
Any time you use for in you will get every property including prototype methods and properties of an object (arrays are still objects). To avoid this, use hasOwnProperty: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty for (var item in

[AngularJS] Re: Can anybody tell me about the callback methods in angularjs.

2014-03-28 Thread Luke Kende
They are called promises. http://docs.angularjs.org/api/ng/service/$q On Thursday, March 27, 2014 4:33:56 AM UTC-6, Deeksha Sharma wrote: -- You received this message because you are subscribed to the Google Groups AngularJS group. To unsubscribe from this group and stop receiving emails

[AngularJS] Re: persistence with routing

2014-03-28 Thread Luke Kende
I agree with Antonio. You are going to shoot yourself in the foot putting everything on $rootScope even though it will seem easier to start. Services are the way to go, period. It took me awhile to realize what Antonio and others are saying: your model should be in your services not on the

[AngularJS] Re: ngInclude crash when file not exists

2014-03-28 Thread Luke Kende
Actually, I've had similar issues. In my case, if your 404 page also loads a template that still requests the same ng-include reference, then it gets stuck in a loop and will crash the browser. It's not necessarily the fault of angular but it would be nice if the ng-include directive knew

[AngularJS] Re: changing scope of other elements

2014-03-28 Thread Luke Kende
I agree with ev, that your problem is that you are creating a new scope for each button. Using the Controller As syntax should help with scoping. Ev, maybe you could be a little more tactful in your replies? Some questions are simple enough to not require plnkrs and being an open forum

Re: [AngularJS] Re: giving $get,$update,$query when iterating JSON object at client side;.

2014-03-28 Thread Luke Kende
That works to... just be aware of for-in and prototype properties. toJson uses the hasOwnProperty or similar in converting. On Fri, Mar 28, 2014 at 7:07 AM, Deeksha Sharma deeksha.sharma2...@gmail.com wrote: Hey Luke Kende, thanks for your suggestion ,I did it by using angular.toJson

[AngularJS] Re: Don't reload page when browser back button is pressed

2014-03-20 Thread Luke Kende
Yes, this is one of the challenges I ran into with routing and angular. Anytime the route changes, the controller and the template are loaded anew. I think we expect angular to behave like cached pages when users hit the back button and it's just there, but it's not the same context with

[AngularJS] Re: Analyzing and modifying object property from $http on the fly with AngularJS

2014-03-20 Thread Luke Kende
Why wouldnt you just call the url with the artist name using the replace function? It won't affect the original value. $http.get('http://ws.audioscrobbler.com/2.0/?method=album.getinfoapi_key=e8aefa857fc74255570c1ee62b01cdbaartist=' + $scope.artist.name.replace(',the', '') + 'album On

Re: [AngularJS] How to get values from ng-model array into input

2014-03-20 Thread Luke Kende
wrote: Il giorno 19/mar/2014, alle ore 06:29, Luke Kende luke@gmail.comjavascript: ha scritto: Ok, so you've got selected_item bound to ng-model and it is an object with a property of Tags that points to an array. Instead of trying interpolation on the value attribute of the input

Re: [AngularJS] Re: Don't reload page when browser back button is pressed

2014-03-20 Thread Luke Kende
Yes, I suppose there are some tricks: http://stackoverflow.com/questions/15813850/detect-history-back-using-angular On Thursday, March 20, 2014 12:43:37 PM UTC-6, Sander Elias wrote: Luke, Pushpendra, If you switch to html5mode, you gain (some) control over the back-button. This enables

[AngularJS] Re: Autocomplete, which one ?

2014-03-20 Thread Luke Kende
I'd use Angular UI Bootsrap's Typeahead (same thing as autocomplete) plus you get the other ui tools that go with it. http://angular-ui.github.io/bootstrap/#/typeahead On Thursday, March 20, 2014 10:32:51 AM UTC-6, Michel Morelli wrote: Hi all, I have see that there are 10+ way to manage an

[AngularJS] Re: how to minimize Controller dependencies

2014-03-19 Thread Luke Kende
If you have so many services/factories being injected, I have to wonder what the controller looks like, meaning, are you doing too much in one controller where somethings could exist in a directive (like elements you use elsewhere)? Also, if you some of these services (not resolves) are so

[AngularJS] Re: Filtering on a filtered value?

2014-03-19 Thread Luke Kende
Well, there's probably be a better way (and I was typing this as Sander answered), but the first thing that comes to mind is to inject $filter service into your controller and set person.BirthDate to the formatted value (or use another field altogether if you need to keep reference to the

[AngularJS] Re: trouble using JavaScript pseudo-classes in an Angular Service defined using a factory method

2014-03-19 Thread Luke Kende
Yep, javascript has a learning curve when coming from other programming languages. I'm not claiming to be an expert but I understand a thing or two, so maybe can offer some direction. It's hard to follow what you are after completely, but I'll try. First, you are reading and trying things

[AngularJS] Re: Angular for responsive, sending viewport size with rest queries?

2014-03-18 Thread Luke Kende
Well, based on how the question points are posed, it doesn't sound like you quite have a grasp of angular, but I will offer some direction. - First, go through the main tutorial if you have not done so: http://docs.angularjs.org/tutorial - Used as a single page app, angular uses partials

Re: [AngularJS] Re: How to get clean mark-up using Angular conditionals

2014-03-18 Thread Luke Kende
And for the sake of consistency/readability why not use ng-style instead of interpolation on style attribute? (Forgive me since I have not seen this syntax before { [ { } ] } ) i ng-click=showHideGroup(row) ng-class=getToggleIcon(row) class=treeToggle *ng-style=getPadding(row)*

[AngularJS] Re: Destroying directives used in a ngRepeat

2014-03-18 Thread Luke Kende
It doesn't sound like the directive is the issue, but the object data in the array bound to ng-repeat. I have a page that uses angular-ui-bootstrap's pager and the only items on the scope are the ones for the current page, hence I do not have this issue. What is the checkbox binding

[AngularJS] Re: How to get values from ng-model array into input

2014-03-18 Thread Luke Kende
Ok, so you've got selected_item bound to ng-model and it is an object with a property of Tags that points to an array. Instead of trying interpolation on the value attribute of the input, make the input use ng-model and update the value when the selected item changes with ng-change. This is

Re: [AngularJS] Re: ng-Routing NOT happening for simple html files without server dependency

2014-03-17 Thread Luke Kende
( { redirectTo: '/view1' }); }); So basically I need to change the route in HTTP protocol. How to do that, if you can help me out. Thanks, Rupam. On Sun, Mar 16, 2014 at 1:44 PM, Luke Kende luke@gmail.comjavascript: wrote: So if you load

[AngularJS] Re: dealing with async

2014-03-17 Thread Luke Kende
Based on what I am hearing, yes, it is fact of life that you can't force execution to wait on the promise from an async call. Resolve is doing this for you anyway. If createCustomer() is returning a promise, then you can do the assignment and use the then() function: var newCust =

[AngularJS] Re: Setting authorization headers does not seems working on mu http.get method

2014-03-17 Thread Luke Kende
This may have to do with the fact the the browser will first make an OPTIONS http request without the basic auth credentials. If your api doesn't handle OPTIONS without the credentials, then the request fails. I ran into this issue (not with Angular but with a jQuery page where we needed

[AngularJS] Re: AngularJS options with a simple_form checkbox

2014-03-17 Thread Luke Kende
Not sure about rails, but one gotcha to look out for is the dot rule. http://stackoverflow.com/questions/17178943/does-my-ng-model-really-need-to-have-a-dot-to-avoid-child-scope-problems On Sunday, March 16, 2014 7:10:55 AM UTC-6, bertly_the_coder wrote: Hi guys, I'm using AngularJS with

[AngularJS] Re: Can Angular.js auto-update a view if a persistent model (server database) is changed by an external app?

2014-03-17 Thread Luke Kende
I'm going to take a stab at this since not exactly sure what you are asking, and say yes: websockets. If something changes on the server side you can push a socket message down to the client which can react and change the view. On Monday, March 17, 2014 6:11:43 PM UTC-6, ali normukhamedov

[AngularJS] Re: ng-Routing NOT happening for simple html files without server dependency

2014-03-16 Thread Luke Kende
Did you use ng-view in your index.html file? Then you can see the XHR call in the browser's developer tools to verify the path being called to load the template. On Saturday, March 15, 2014 10:35:59 PM UTC-6, Rupam Dutta wrote: Hi folks, I am stuck in a very basic area. I was just

[AngularJS] Re: $watch an array of objects and mark which objects are dirty

2014-03-16 Thread Luke Kende
Yep, you'd have to loop through to determine which was changed $watching an array. (I don't think you want to $watch each object in array, bad idea) Comparing objects isn't too difficult with angular.equals: http://docs.angularjs.org/api/ng/function/angular.equals But, I have to ask what

Re: [AngularJS] Re: ng-Routing NOT happening for simple html files without server dependency

2014-03-16 Thread Luke Kende
a try. But just to reconfirm about the template path, I tried with hard-coded absolute url (just for testing) instead of relative path in my templateUrl, that also did not work. Thanks, Rupam. On Mar 16, 2014 12:56 PM, Luke Kende luke.ke...@gmail.com wrote: Did you use ng-view in your

[AngularJS] Re: ngClass - condition when to run checks in an ngRepeat to imporve efficiency

2014-03-09 Thread Luke Kende
I had a similar issue. What I did was to take the logic out of ng-class. In other words, my final ng-class only ever checked booleans, never a function: { selDate: col.isSelected, selCompDate: col.isCompSelected, available: col.isValid, inRange: col.isinRange, inCompRange:

[AngularJS] Re: DOM manipulation and $compile not working

2014-03-09 Thread Luke Kende
You are mixing angular scope with dom manipulation. They are two different things so not surprised you are having trouble. $scope values should point to javascript literals, objects, arrays, but not to dom elements. You can't call a jquery method without wrapping it first Try this:

Re: [AngularJS] Re: Element from scope?

2014-03-05 Thread Luke Kende
of functions and I was hoping to be able to manipulate the associated element node in the same function. Tue, Mar 4, 2014 at 1:40 AM, Luke Kende luke.ke...@gmail.com wrote: $scope is not associated with just one element if it's in a controller, and if you were using a directive, I do not think

[AngularJS] Re: Paginated Scrolling - strange behavior of custom directive

2014-03-05 Thread Luke Kende
You might look at ng-grid. Of course, I'm assuming it's implemented with scroll bars there because I know jqGrid is. Otherwise, you'll need to wrap the table in a div with set dimensions and overflow:auto. You will not keep your header a the top as the user scrolls... you can't add scroll

[AngularJS] Re: Using scope data from controller in a directive

2014-03-05 Thread Luke Kende
Ignore the div ng-provider forgot to remove it before changing my example. On Wednesday, March 5, 2014 8:10:28 PM UTC-7, Luke Kende wrote: It's better practice I believe to pass in data as attributes than just expecting the scope data to be there, but just use interpolation in your template

[AngularJS] Re: Referencing $scope data inside ng-repeat

2014-03-04 Thread Luke Kende
Just reference it from the the userData array: tr ng-repeat=emp in employees td{{ emp.name }}/td td{{ emp.city }}/td td{{ emp.date }}/td td{{ dateConvert(emp.date, -4) | date:'MM/dd/ HH:mm:ss' }}/td tddiv{{ userData[0].offset }}/div/td /tr On Tuesday, March 4, 2014

[AngularJS] Re: Angularjs to create a widget not a SPA

2014-03-04 Thread Luke Kende
No, you can use it for a widget, does not have to be a SPA. Just realize that the context of the angular's javascript where you set your ng-app directive and the context of javascript everywhere else on the page are not the same thing. If they interact at all, you may want the whole page done

[AngularJS] Re: WebRTC with AngularJS

2014-03-04 Thread Luke Kende
I really don't know enough about WebRTC but you got me checking it out. I will say that if a library is being used outside of angular, but a reference is inside angular controller, you will have to use $scope.$apply function to keep within the digest loop of Angular. That may be part of it.

Re: [AngularJS] Navigation, Services and Controllers.

2014-03-03 Thread Luke Kende
Not sure exactly what you are trying to do, but agree with Witold that services are injected into controllers and then they can handle using $location. Another option, not that it's a good one, but just to pose it for thought is that you can inject $rootScope into the service and $broadcast

[AngularJS] Re: Questions on best practice for external REST URLs (for email verification) and session setup via XHR

2014-03-03 Thread Luke Kende
Sounds like you are on the right path. Having a SPA is good for once a user is logged in. We actually redirect the user to a login page outside of angular that handles the session and creates the cookie. The app only offers functionality once logged. Of course, you've already programmed a

Re: [AngularJS] Re: Chrome 33 Seems to Have Broken Angular

2014-03-02 Thread Luke Kende
around which mirrors my experience exactly. Question asked on StackOverFlowhttp://stackoverflow.com/questions/22046170/explanation-on-window-getcomputedstyle-and-why-chrome-handles-it-differentlywhich also mirrors my experience. On Sunday, March 2, 2014 2:37:28 AM UTC-5, Luke Kende wrote

Re: [AngularJS] Re: Help finding a robust UI DnD, Cut/Paste sortable directives

2014-03-02 Thread Luke Kende
to attempt something similar into a ckeditor target as well. Unfortunately, there are few examples in this space.. On Sun, Mar 2, 2014 at 12:30 AM, Luke Kende luke.ke...@gmail.com wrote: I think we get used to frameworks having wide coverage like jQuery or ROR, but these things take time

[AngularJS] Re: Multiple $resourse URL for Factory

2014-03-02 Thread Luke Kende
yes, but restful api is a little off. Meaning your save, update, and delete methods should not have to specific the action in the url since the HTTP method defines that for you. Also, the path should be consistent, not persons plural and then person singular: GET /persons--- show all person

[AngularJS] Re: Angular.js + node.js (total.js)

2014-03-01 Thread Luke Kende
Cool. Looks like a lot of work went into this. Will check it out if when I start another project with Node and Angular. On Saturday, March 1, 2014 9:53:21 AM UTC-7, Peter Širka wrote: *TOTALSTACK* Hello, total.js is web application framework for node.js and new version supports great

[AngularJS] Re: Angular-UI bootstrap drag-drop form builder?

2014-03-01 Thread Luke Kende
A little unsure what you are asking. Are you saying you want to build forms that also have options like tooltips and tabs and the like? Why not just use the two in conjunction for your project. If you want to make a tool that uses both, they are open source, so fork them and dig in you

[AngularJS] Re: Help finding a robust UI DnD, Cut/Paste sortable directives

2014-03-01 Thread Luke Kende
I think we get used to frameworks having wide coverage like jQuery or ROR, but these things take time and there's a lot of competition right now for what will be the next javascripting tool. I chose angular js because out of all the emerging libraries, frameworks, what-have-you, it seems the

[AngularJS] Re: Chrome 33 Seems to Have Broken Angular

2014-03-01 Thread Luke Kende
Can you demonstrate it in a plunker or similar? I'm not having any trouble with Chrome 33 and manipulating classes in directives. Have you debugged your directive to see where it fails? What kind of error are you seeing other than that it just doesn't work? On Saturday, March 1, 2014 4:19:45

[AngularJS] Re: how to pass a object to a new page in angulatjs

2014-02-28 Thread Luke Kende
You'll need to keep your objects referenced in a service, then use some id that maps to the $routeParam. Something like this: function MyService(){ var objects = [ { id: 1, data: 'the data'}, { id: 2, data: 'more data'} ] return objects; } //in new route controller - this not

[AngularJS] Re: Adding special symbols in bound data

2014-02-28 Thread Luke Kende
Use ng-bind-html http://docs.angularjs.org/api/ng/directive/ngBindHtml On Thursday, February 27, 2014 7:35:33 AM UTC-7, Yonatan Kra wrote: Hi, I have a simple bound data such that: div ng-repeat=item in items ng-bind=item/div *items *exist in the scope and hold several text and/or HTML

[AngularJS] Re: Group common services or individual specialized services?

2014-02-28 Thread Luke Kende
The general practice is to put it in a service, which exists in a file named services.js. I have my api for many assets all in one service and the file contains many services in addition to the API $resource. If you want it to be somewhat modular to share between different angular apps, then

Re: [AngularJS] Re: Is there any directive to affect immediately between controller and view except ng-model?

2014-02-27 Thread Luke Kende
($tooltipProvider) { $tooltipProvider.setTriggers({ 'keypress': 'mouseleave', 'never': 'keydown' });}])* *I think its the time delay of calling popover trigger?* *Can u solve it?* On Thursday, 27 February 2014 12:13:39 UTC+5:30, Luke Kende wrote: what do you mean? pretty much all directives

[AngularJS] Re: ng-view, partials, routes and stuff

2014-02-26 Thread Luke Kende
If you need nested views where parent view needs to maintain state after going from /admin to /admin/user/cf23df2207d99a7, and you are going to have a lot of these, or multiple nestings, then I suggest ui-router: https://github.com/angular-ui/ui-router Personally, it was more than I needed so

Re: [AngularJS] How future proof is Angular JS in terms of Google Chrome Updates

2014-02-26 Thread Luke Kende
Angular does support IE8: http://docs.angularjs.org/guide/ie We have it tested and working for IE8+. There were a couple of tweaks and polyfills that had to be done in the initial testing phase for our own implementation. It's your choice, but it's not a lost cause. We've been running

[AngularJS] Re: Is there any directive to affect immediately between controller and view except ng-model?

2014-02-26 Thread Luke Kende
what do you mean? pretty much all directives are immediate. ng-bind ng-include ng-show/hide ng-switch and so on On Wednesday, February 26, 2014 8:19:04 AM UTC-7, Sowmiya wrote: *Hi,* * Is there any directive to affect immediately between controller and view except ng-model?* -- You

Re: [AngularJS] Re: Using same object for two different dom elements after fetching from the database.

2014-02-25 Thread Luke Kende
Nope. Each of us programs a little differently. Personally, I'd probably transform the data before sending to storage so that each todo is a single object that references the lists it belongs to. That way upon retrieving them you just rebuild your lists' arrays pointing to a single object that

[AngularJS] Re: Using same object for two different dom elements after fetching from the database.

2014-02-24 Thread Luke Kende
Reiterating what Sander is saying, you are referencing one object initially in both arrays, but after parsing, you have two separate objects. You'll need to manage this either upon saving or retrieving (or both) to get the intended results. On Monday, February 24, 2014 1:52:22 PM UTC-7,

[AngularJS] Re: How to handle a decimal value in AngularJs

2014-02-24 Thread Luke Kende
You'll need to create a plnkr or similar to demonstrate this issue. Angular doesn't just convert a float to an object like this. It looks like the value is being split() with no delimiter to get an array and then converted to an object. That's the only way to get there that I can tell. On

[AngularJS] Re: Model and view update through angularJS

2014-02-24 Thread Luke Kende
If you just need to see that the value is updating on the $scope, use an ng-click on a button to call a function and console.log() the value after you've changed it in the view. div ng-controller=myCtrl input ng-model=item.text button ng-click=logTextLog it/button /div function myCtrl(){

[AngularJS] Re: listening to css3 transition events in angularjs

2014-02-24 Thread Luke Kende
You can create a directive to do this and add it to the body tag if you want just one catch for any 'transitionend event. Event handling in Angular and say jQuery are very different systems, so the $on events are only for built-in angular events or where you $broadcast or $emit an event

  1   2   >