[AngularJS] Child route base component rendered on every child route

2016-10-16 Thread Luke
Hey, *I have a module with child routes working like this:* const appRoutes: Routes = [ { path: '', redirectTo: 'login', pathMatch: 'full'}, { path: 'login', component: BackendLoginComponent }, ]; @NgModule({ imports: [RouterModule.forChild(appRoutes)], exports: [RouterModule] }) *defined as

[AngularJS] Re: Correct way of implementing db data retrieving

2016-10-03 Thread Luke
ta in general ? Some sort of angular2-expressjs middleware Thanks again! Dňa pondelok, 3. októbra 2016 10:59:59 UTC+2 Luke napísal(-a): > > Hi, > > I'd like to retrieve data from MongoDB. Anywhere I search for something > like this, I see an application divided into two parts

[AngularJS] Correct way of implementing db data retrieving

2016-10-03 Thread Luke
Hi, I'd like to retrieve data from MongoDB. Anywhere I search for something like this, I see an application divided into two parts - Client(angular2) and API(Express.js). Is this the only approach to this? My idea is to create a service, in which I connect to database using Mongoose - connect(

[AngularJS] Re: Angular2 - one route, multiple components

2016-09-15 Thread Luke
Great, thanks again -- 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 to angular@googlegroups.

[AngularJS] Re: Angular2 - one route, multiple components

2016-09-15 Thread Luke
Thanks, that's actually a great idea ! Just to make sure - in template of the parent component, I have an ngSwitch on let's say a , in it there are two child components .. and .. also these two components are two-way and have @input properties of slug? -- You received this message because you a

[AngularJS] Angular2 - one route, multiple components

2016-09-14 Thread Luke
Hey, this is my issue - I want to have one route for products with path: ':slug' meaning urls like these: example.com/my-product , example.com/another-product, example.com/product-number-three, (slug after '/' changes) and another route for brands also with path like this: ':slug' for urls lik

[AngularJS] Re: TypeError: router_1.provideRouter is not a function

2016-07-11 Thread Steven Luke
I don't know your environment, so I can't give details. The gist of it is that you need to provide the depended for the application. If you can't do it with the IDE, I would suggest you dump it and head over to http://angular.io and follow the tutorial on how to do it manually. Once you know ho

[AngularJS] Re: TypeError: router_1.provideRouter is not a function

2016-07-10 Thread Steven Luke
That isn't really a 'special' file, so much as it is where you tell your SystemJS the file should be when you do this: // Add package entries for angular packages ngPackageNames.forEach(function (pkgName) { packages['@angular/' + pkgName] = { main: pkgName + '.umd.js', defaultExtensi

[AngularJS] Re: TypeError: router_1.provideRouter is not a function

2016-07-10 Thread Steven Luke
Hmm, that looks okay to me, when I copy and paste, and make necessary edits to account for different system setups, then it works. The only time I get it to show the message is when @angular/router is mapped to a file which exists but is not the correct file. Can you manually navigate to /lib

[AngularJS] Re: TypeError: router_1.provideRouter is not a function

2016-07-10 Thread Steven Luke
What does your systemjs config look like? I was able to reproduce the error by mapping the @angular/router to @angular/router-deprecated. -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails fro

Re: [AngularJS] Re: Angular2 cannot find element

2016-07-09 Thread Steven Luke
" The question is: how is bootstrap not finding the element when it clearly and definitely exists." As far as the bootstrapper knows, it doesn't exist. So you have to figure out why not. There are various reasons (not transpiled because of error, not in the location the code says it is, develo

[AngularJS] Re: Injecting a service into a domain model

2016-07-09 Thread Steven Luke
Dependency Injection is like a virus, once you start to use it, it spreads until it is the only way to make objects... The Books service is now a method parameter to the Book. You need to pass it in. If you can't new a Books instance (which you shouldn't) then you should inject it into the Bo

[AngularJS] Re: "@angular/router": "3.0.0-beta.2" - multiple (question)

2016-07-08 Thread Steven Luke
Check out this block: http://victorsavkin.com/post/145672529346/angular-router If you had three routers //no name == the default Then the RouteConfigs to target each would be like: {path: 'thepath1', component: TheComponent} //no outlet for the default {path: 'thepath2', component: TheCom

[AngularJS] Re: Unable to access data on route data. angular 2 RC4

2016-07-08 Thread Steven Luke
First, are you sure you want to use Data for that? Data is defined at the point where the route configuration occurs - usually at the start of the application, NOT when the user navigates. So you should make sure that the selectedPhysical is defined and has the intended value when the settings

[AngularJS] Re: Angular2 cannot find element

2016-07-08 Thread Steven Luke
Unfortunately, that is not a whole lot to go on. Check your systemjs.config to make sure the paths are assigned correctly. Make sure there is nothing in the login module that is preventing it from transpiling, make sure syntax is all 100% and objects that you reference exist. -- You receive

[AngularJS] Re: Angular2: Router v3: have components manage their own route

2016-07-08 Thread Steven Luke
Okay, I figured out a way that I don't like, but in so doing, I think it is generally not a nice idea (having child components manage their own routes), I think we need to manage the routes from the top level. Let me explain. First, a working solution is on Plunker here: https://embed.plnkr.c

[AngularJS] Angular2: Router v3: have components manage their own route

2016-07-07 Thread Steven Luke
HI all, I have been working through the MEAP book Angular2 Development with Typescript. It is a pre-release book and is using the Router v2, so isn't current with the newer Router v3 in the latest Angular release candidates. It has an interesting task in chapter 3 about building routes, and

[AngularJS] Re: Angular2 app not working in IE 11

2016-07-07 Thread Steven Luke
You need the ES6 and ES5 shims for IE 11 (not sure if they work in older browsers, but they would be a minimum). I have this in my index.html's head element: You will need to install the es5-shim and es6-shim into your node_modules: path to project > npm install es5-shim --save path to

[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 Date(reco

Re: [AngularJS] Re: Job offer with share: front-end developer (Anguar JS,SCSS...)

2015-08-20 Thread Luke Hamilton
Anymore details? Kind regards, Luke Hamilton <http://twitter.com/lukekhamilton> Byron, Australia: +61 0430223558 (Current Location) Ubud, Bali: +62 821 44383880 “When I let go of what I am, I become what I might be.” – *Lao Tzu* On Wed, Aug 19, 2015 at 5:11 PM, Abhijeet Kadam wrote: &

[AngularJS] Re: different sidebar for each view

2015-08-18 Thread Luke Kende
Or, just use ng-include. I have an optional sidebar on every page of my app, so there's an element on my index page that uses ng-include and points to the variable template it's assigned to. The top-controller scope, that's alway there regardless of route (MainCtrl), has the sidebar object ref

[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; $scope.$watch('flag',

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

2015-06-12 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 separ

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

2015-05-15 Thread Luke Kende
Yes, your template for a directive can have another directive and you are on the right path to create your data structures such that iterating over them "lines-up" with angular's ng-repeat in the goal you are looking for. Glad you are seeing a path. Luke On Thu, May 14,

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

2015-05-13 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 i

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

2015-05-02 Thread Luke Kende
at 2:23 PM, Michał Wasiluk wrote: > @Luke Kenede - Why there should be only one config block per module? > > Angular applies configuration blocks in the same order they were > registered ( > https://code.angularjs.org/1.3.15/docs/guide/module#configuration-blocks) > I prefer

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 ne

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

2015-04-28 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: $locationProvider

[AngularJS] Re: Tree structure construction is breaking( problem with $digest())

2015-04-18 Thread Luke Kende
I would suggest simplifying. Here are some ideas to get you thinking.. - Do you really need to bind all 11000 records at the same time? Maybe add some to the array then add more as a user scrolls down. - What are you showing initially? If you only show parent nodes until a user exp

[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 look

[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 } On Monday, April 13, 2015 at 11:46:07 PM UTC-6, Stefan Schmidt wrote: > > We had problems with the datepicker not opening when it was inside a div > that

[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 c

[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 the

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

2015-04-14 Thread Luke Kende
gt; value after page load into object collection inside the angularjs > controller. > So that I can find the difference that value has changes or not. > > > > > On Wednesday, 15 April 2015 11:26:35 UTC+5:30, Luke Kende wrote: >> >> >> Well, you could bind each fo

[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; } e

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: This is advantageous because you can change, parts of the url only, like if you

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 grun

[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 cas

[AngularJS] Django + AngularJS - first attempt - variable not evaluated

2014-11-11 Thread Luke B
erbatim, but I had the same result. Anybody has experienced the same problems and can help me? thanks LuKe -- 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 a

[AngularJS] Re: Link on the main site do not render page

2014-10-16 Thread Luke Lewis
I'm getting exactly the same when I browse to docs.angular.js address. I'm using Chrome v38. Clearing cookies and reopening Chrome had no effect and I've replicated the issue in IE11. What's going on?

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

2014-09-12 Thread Luke Kende
variable such that no matter what URL a user comes in to the app on, certain routines don't fire until that ready variable is set. It only has to be set that one time for the life of the app (until a refresh). On Fri, Sep 12, 2014 at 9:03 AM, Dan Martin wrote: > Luke, thanks to your suggestio

[AngularJS] Re: Defining a resource URL globally.

2014-08-27 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 1:01:

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

2014-07-28 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: 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 e

[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: ng-href="#/{{l

[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 > > $(".gly

[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 con

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

2014-04-20 Thread Luke Kende
; > $scope.$on('clientAuthenticated', function(phpData) { > $scope.clientData = userData.getData() > }); > > > > 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 >

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

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

2014-04-18 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 t

[AngularJS] Re: Bad argument error on Android 2.3

2014-04-18 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 be

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

2014-04-18 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, cr

[AngularJS] Re: Distinguish between bound and unbound forms

2014-04-18 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 var

[AngularJS] Re: item in Items happy problem

2014-04-18 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 rem

[AngularJS] Re: directive design: pass through 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": template: {{value}} On

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 kno

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

2014-04-18 Thread Luke Kende
otScope to broadcast, really any controller can add a listener to react to it. Once again, it's up to you how to structure views and controllers. Having the login come into the client controller is fine since any controller (main or child or other) can add a listener and respond. Good luck. Luk

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

2014-04-18 Thread Luke Kende
t; http://plnkr.co/edit/h3a6ZwkUF2vCy36gEPUe?p=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

[AngularJS] Re: angularJS parsing xml problem beanJSON

2014-04-17 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 : > > > OK > > > 1 > > > 2 > > > > > it is > Content-Type: > application/xml;charset=UTF-8 >

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

2014-04-17 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: http://stackoverflow.com/questions

Re: [AngularJS] scrolling many items in small box

2014-04-17 Thread Luke Kende
Yes this isn't an Angular question but a css question. Raul put you on the right track. Here's a simple example: {{item.name}} On Thursday, April 17, 2014 4:33:00 PM UTC-6, Neil Camara wrote: > > Awesome! I'll try that. I thought a library was required. :) > > Thanks! > -- You receive

[AngularJS] Re: HI People, a class is interfering with my app

2014-04-17 Thread Luke Kende
Why does it break your images? Is this a css issue? Or maybe some directive responding to class="slides"? Are you using the angular version of flex slider? https://github.com/EnthusiasticCode/angular-flexslider On Thursday, April 17, 2014 11:19:55 PM UTC-6, Mack Solomon wrote: > > HI I am us

[AngularJS] Re: How can i insert slideUp and slideDown on angular way?

2014-04-17 Thread Luke Kende
You may be able to use ng-animate (have not messed with it yet, but it will want to use css transitions)... For jQuery methods, write a directive for any element you want to have this effect... something like: Hello World .directive('slideUp', function(){ return { link: function(scope, element,

[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 han

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

2014-04-16 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: Directive Load Lazy

2014-04-16 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', function($ti

[AngularJS] Re: Separating functionality of a directive?

2014-04-16 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: Call a function into a directive, passing parameters

2014-04-16 Thread Luke Kende
http://stackoverflow.com/questions/17583004/call-an-angularjs-controller-function-from-a-directive-without-isolated-scope On Wednesday, April 16, 2014 6:57:35 PM UTC-6, Michel Morelli wrote: > > Hi all, > > I have a custom directive. > > In my html i write this: > > > success="writeFid()"> > >

[AngularJS] Re: Enable/disable button if value is different than select by default

2014-04-16 Thread Luke Kende
A plunker would help illuminate the issue. It looks like you are trying to mix jQuery with angular which is not a good idea inside the controller. Also, the way you think has to change with angular since it's a declarative language. Here's a plunk I wrote to demo an approach: http://plnkr.co

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 s

[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 fo

[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: http://

[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 don

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, 2014

[AngularJS] Re: Better performance Options: $watch/$on ?

2014-04-01 Thread Luke Kende
On first observation, anytime you are using $watch you are going to get a performance hit, especially since it must execute the function for each digest cycle. Generally, $watch is only needed for items on scope. If you did actually have use for the window height on scope itself for ui bindi

[AngularJS] Re: Weirdnesss while viewing angularjs.org using IE9

2014-03-31 Thread Luke Kende
I can verify this behavior in IE9. However, if you go directly to http://angularjs.org/#!/ it appears to work fine. IE9 doesn't support HTML5's history api and push state hence it will switch to using location.hash which is why you are seeing #!. Apparently there's a bug which has not been ca

[AngularJS] Re: Change path and show data in new partial

2014-03-31 Thread Luke Kende
Services are your friend. Any state that needs to be maintained between views and controllers can be done in services. Worst-case you can use $rootScope. Do not post. Also, simplify. If you are just learning Angular, then why make it so complicated to begin? On Monday, March 31, 2014 4:25:3

Re: [AngularJS] Re: persistence with routing

2014-03-28 Thread Luke Kende
Your email name is kinda funny. Glad you figured it out and it is clicking for you. Services/factories can be really versatile and powerful and keep code clean... Happy coding! On Fri, Mar 28, 2014 at 9:42 AM, Pudas Jriest wrote: > Okay, so I had to actually write a service for the cache to

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 an

[AngularJS] Re: Extending a directive

2014-03-28 Thread Luke Kende
Unfortunately, your new directive doesn't know about the existing wijmo directive and vice versa. You might ask the guys at wijmo for a solution. On Wednesday, March 26, 2014 4:55:26 AM UTC-6, scarlatine wrote: > > Hi, > I am a beginner with AngularJS. I would like to add an icon on the left of

[AngularJS] Re: changing scope of other elements

2014-03-27 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 it'

[AngularJS] Re: ngInclude crash when file not exists

2014-03-27 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 that

[AngularJS] Re: persistence with routing

2014-03-27 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: Use angularjs withe other libraries js in the same application ??

2014-03-27 Thread Luke Kende
Yes. I have used several other libraries with AngularJs. Mostly I try to use angular only whenever possible, but when I use other libraries, it's typically in services/factories. Technically they should probably converted to angular directives, but who has time to rewrite a complex library.

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

2014-03-27 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

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

2014-03-27 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 i

[AngularJS] Re: AngularJS filters based on PHP server side request/response

2014-03-27 Thread Luke Kende
Right. So based off what Nikita mentions and the link posted, basically, you have two options. Preload all your data that is then filtered locally in Angular, or make XHR (ajax, api, http) calls to php server which returns JSON to populate the page. Personally, we built filters for our UI in

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

2014-03-21 Thread Luke Kende
in my > code. > Can you think of something wrong that could make my code behave the way it > is? > perhaps in the way I'm defining my service or controller? > I think I replicated this right from the docs, but since I don't > understand how those definitions work, > ma

[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

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-but

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

2014-03-20 Thread Luke Kende
I don't think angular can be aware that the actual back button was pressed, but it can respond to route changes: $scope.$on('$routeChangeSuccess',function(){ console.log('location is now', $location.path()) }) On Thu, Mar 20, 2014 at 1:41 AM, Pushpendra Kumar wrote:

[AngularJS] Re: Web API 2 OData changes to JSON/scope

2014-03-19 Thread Luke Kende
IF you can't change what the api is sending (this is not a VS forum so can't help you there), then you can reference the value attribute on the angular side to match what you need on the scope. $http.get('/some/url', function(response){ $scope.steps = response.value; }) On Wednesday, March

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

2014-03-19 Thread Luke Kende
10:50 AM UTC-6, Michel Morelli wrote: > > > Il giorno 19/mar/2014, alle ore 06:29, Luke Kende > > > 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 > inte

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

2014-03-19 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.getinfo&api_key=e8aefa857fc74255570c1ee62b01cdba&artist=' + $scope.artist.name.replace(',the', '') + '&album On

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

2014-03-19 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 deep

[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 fro

[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 origi

[AngularJS] Re: Service results and where to put them

2014-03-18 Thread Luke Kende
Yep, that's the right way. I actually have a service called 'api' that defines all my $resource objects and then returns an object that references what I need the way I need it. For example: //very simplified from what I really have service('api', ['$http','$resource','$q', function($

[AngularJS] Re: Hot to use custom modules with a controller in the Hot Towel template?

2014-03-18 Thread Luke Kende
Without looking into Hot Towel, which I had not heard of until now, this is the error you get when angular sees no reference to a service or factory named 'gantt'. Though maybe there's a module named gantt being referenced correctly, it see no service/factory named 'gantt' hence it finds no pr

[AngularJS] Re: how to minimize Controller dependencies

2014-03-18 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 comm

  1   2   >