[AngularJS] Re: Angular 2, input decrator/ passing value clarification

2016-04-22 Thread Zlatko Đurić
On Friday, April 22, 2016 at 9:07:08 PM UTC+2, Dawg wrote: > > Hello everybody, > > > > Not certain, but I'm pretty sure it's working because of `[]` above. By putting the square brackets around the property, you explicitly declare it as a property (since there's no native html attribute

[AngularJS] Re: Angular 2, input decrator/ passing value clarification

2016-04-22 Thread Zlatko Đurić
On Friday, April 22, 2016 at 9:07:08 PM UTC+2, Dawg wrote: > > Hello everybody, > > > > Not certain, but I'm pretty sure it's working because of `[]` above. By putting the square brackets around the property, you explicitly declare it as a property (since there's no native html attribute

Re: [AngularJS] Re: Angular2: http service fail to get json data

2016-04-22 Thread Zlatko Đurić
Well, it looks like it is because you assign it a string initially, in the class declaration. That later makes the `this.data = data` stringify the array (and if you do a `[].toString()` you get ` '[object Object]'`). So declare it initially as array: `jobs = [];` - or be explicit about it, so tha

[AngularJS] Re: Just in time calculations in the view

2016-04-22 Thread Sander Elias
Hi Martin, A directive is not the solution. For the reasons you are giving yourself. If you really need to 'store' the result of the calculation back in the scope you are better of doing this in the controller, or even better in a service. If it's 'temp' data you need just for sorting or other

[AngularJS] Re: Cannot read property '1' of null

2016-04-22 Thread Sander Elias
Hi Julian, You can't use arrow functions in places where the function is expected to be bound to a different 'this'. By design arrow functions are lexical bound to the 'this' where they are defined. In short, using normal functions is the most ES6y way to solve this. Regards Sander -- You r

[AngularJS] Unable to execute custom javascripts after setting the Controller

2016-04-22 Thread Srivatsan Seshadri
Hi, I have a question. Like, I have a Custom javascript file where I execute the common functionalities like On document load etc. Now, after setting the Controller in the ngRoute directive, these javascripts do not execute suddenly. The only work around is to put them in the controller file. I

[AngularJS] Re: Angular2: http service fail to get json data

2016-04-22 Thread jian . zyi
@Zlatko Đurić thanks for your help. that's right, after log "this.jobs" in subscribe function, it's working fine. but another problem is: when I use ngFor to loop this.jobs, it also get an error "EXCEPTION: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only

[AngularJS] date filter for string date, get the seconds

2016-04-22 Thread Janis Rough
I had to use the type field for the date input as hidden so the date is a string in this format:2016-04-22T19:10:31.064Z I need to make a date calculation and get the seconds for the expression message below.How do I get the seconds from the string? I don't know how to make a date filter.

[AngularJS] Re: angular moment plugin error on adding the depedency

2016-04-22 Thread Janis Rough
thanks, it did I On Thursday, April 21, 2016 at 10:46:24 PM UTC-7, Vaibhav Gupta wrote: > > Hi, > > There is a syntax error with the above code. > > commentform.js:12 Uncaught SyntaxError: Unexpected token . > > The directive definition starts with ".", which is invalid javascript > syntax. Foll

[AngularJS] Angular 2, input decrator/ passing value clarification

2016-04-22 Thread Dawg
Hello everybody, Looking for clarification on web based angular 2 tutorial. According to the tutorial if the value in app.component value(myValue = 0) or empty the default value from the child component should be the default value. I tried experimenting with the code it only works if value in A

[AngularJS] Gulping Angular2 JS Libraries

2016-04-22 Thread Jerry Wilson
Is it possible to compile angular libraries into one single js file? For example, I am using gulp to copy all the angular libs into a single js file that I am referencing in my angular application. This seems to cause console errors in chrome; however, if I reference the dependencies directly,

[AngularJS] Re: Angular2: http service fail to get json data

2016-04-22 Thread Zlatko Đurić
Oh, that's because your jobs have not been fetched yet. When ou call getJobStatus() on jobService, it merely fires the request. It does not complete the request. So your code is executed like this (from ngOnInit forward): - this.getjobsStatus() // on jobsComponent - getjobsStatus calls jobsS

[AngularJS] Just in time calculations in the view

2016-04-22 Thread Martin Convery
Hi Guys, I have a view that is displaying a table, and I would like to perform certain calculations at "render time" for want of a better description. Id like to compute things like the differences between values in 2 columns as the data is rendered into the view, with the additional requiremen

[AngularJS] need expand collapsible component in angular 2

2016-04-22 Thread Sandeep Sharma
I need a expand collapse component in angular 2. which expand/collapse at a time one. -- 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...@googlegr

[AngularJS] Angular2: http service fail to get json data

2016-04-22 Thread jian . zyi
#1. API URL: http://127.0.0.1/api/jobs/status Return json: {"error":0,"data":[{"job_id":"s2323143455","status":"Enable","creator": "user1","last-modified":"2016-04-20"},{"job_id":"sdfsdf132434","status": "Enable","creator":"user2","last-modified":"2016-04-20"}]} #2. job.service.ts import {Inject

[AngularJS] Cannot read property '1' of null

2016-04-22 Thread Julian Lyndon-Smith
I'm getting this error on 1.5.5 of angular, I have added a comment to an existing issue (https://github.com/angular/angular.js/issues/12424) but I was wondering in the meantime what the best way forward would be I have this code which is causing the problem resolve: { 'options': ($stateParams

[AngularJS] Re: angular2 wizard, is it possible to show multiple steps at the same time while they're configured for routing

2016-04-22 Thread Günter Zöchbauer
No, that's not possible. Just move the data out of your component into a service, then show the same component as often as you want with the same service instance. (like already answered on SO) On Thursday, April 21, 2016 at 7:32:05 PM UTC+2, hani wrote: > > Is there a way to tell angular router

[AngularJS] Re: Angular2 router : Changing route doesn't load the component for first time

2016-04-22 Thread Günter Zöchbauer
See also http://stackoverflow.com/questions/36767520/angular2-router-changing-route-doesnt-load-the-component-for-first-time On Thursday, April 21, 2016 at 1:20:00 PM UTC+2, vineet dev wrote: > > I am changing the route of angular2 application from '/' to '/xyz'. For > 'xyz' I have made a compo

Re: [AngularJS] Re: AngularJS Factory vs Service vs Provider

2016-04-22 Thread András Csányi
Hi, Thank you for the link! It is a good article about this topic! Thanks, András - - -- Csanyi Andras (Sayusi Ando) -- http://sayusi.hu -- http://facebook.com/andras.csanyi -- ""Trust in God and keep your gunpowder dry!" - Cromwell On 22 April 2016 at 08:59, Tito wrote: > http://tylermcg

Re: [AngularJS] Re: help about api

2016-04-22 Thread Tito
ah I see what you mean. very hard to find. something like this but for products https://developer.bestbuy.com/documentation/products-api On Thursday, April 21, 2016 at 7:06:04 PM UTC-7, hnin hnin wrote: > > But I don't want to store data manually in backend server. I want to > retrieve real tim

[AngularJS] Re: AngularJS Factory vs Service vs Provider

2016-04-22 Thread Tito
http://tylermcginnis.com/angularjs-factory-vs-service-vs-provider/ On Thursday, April 21, 2016 at 11:29:36 PM UTC-7, Deepak Agarwal wrote: > > The 3 concepts of AngularJS Factory, Service and Provider seems confusing > to understand. Could someone please let me know - > >1. Real-time examples