mrbubbles: when you use just 'hash' as the key for the computed, then it will only fire when something does set('hash', whatever)
but not set('hash.firstItem', updatedFirstItem)
mrbubbles
Oh sorry skidder I didn’t realise you’d posted code before..thanks fro that
skidder
or you can change the computed to be on hash.firstItem and it also works.
mrbubbles
Ember-twiddle keeps punting me to the homepage when I click on a link so I thought you were just teliling me to use it :)
Ah I’ve got you. will go with the first option as it’s for form validation (need to know when the fields are populated)
Thanks for your help
There is no way to just tell it to use all the properties is there? Just thinking that listing them all in a {} is quite verbose
I think .@each (or .[]) only works on arrays
locks
the shortest syntax is 'hash.{oneProperty,anotherProperty,oneMoreProperty}'
stefan_17 has quit
NullVoxPopuli joined the channel
skidder
locks: Thanks for clarifying
momomomomo joined the channel
NullVoxPopuli
how do I have array data in a model attribute?
currently I'm getting Ember.A(...).mapBy is not a function
locks
NullVoxPopuli: what do you mean?
NullVoxPopuli
the error is in adapter-populated-record-array.js:56
like, I just want field: [1,2,3]
locks
NullVoxPopuli: DS.attr()
NullVoxPopuli
that's what I have :-\
locks
what adapter?
NullVoxPopuli
JSONAPI
my array is 381 items if that matters
khoapham has quit
khoapham joined the channel
big|bad|wolf joined the channel
big|bad|wolf has quit
momomomomo has quit
it complains even when all the fields are null
o.o
skidder has quit
SpeedUp joined the channel
sandstrom has quit
momomomomo joined the channel
SpeedUp
Hi everyone, my Ember application incremental builds are taking longer than 30 seconds on a Windows 7, i7 930 2.8ghz machine. Can anyone help me bring that number down?
I've already installed and run the ember-cli-windows addon
The interesting thing is that build times are similar on an ssd and hdd
when I set suggestionTemplate in the handlebars, I get the string that I put there back instead of the function.
I've tried placing the function in the addon itself, in the template's route and controller, there must be some right place to put it
momomomomo has quit
no matter what I've tried I'm getting an error from typeahead that says it's not a function (because it's a string)
AAoK has quit
momomomomo joined the channel
Timba-as joined the channel
nerium joined the channel
ambushsabre has quit
sandstrom joined the channel
scottn_work has quit
scottn_work joined the channel
iamse7en has quit
PiCOBot1 has quit
PiCOBot joined the channel
ELCALOR
is it possible to import a (legacy) view in Ember 2?
Weezey
ELCALOR: just takes some refactoring, in my limited experience.
turned my view into a compontent relatively easily
ELCALOR
i guess my thinking is wrong
and i better inject some kind of global variable in the view and alter that
then get the global in other places again
Weezey
if you use ember 1.13 you can see the deprecations and gracefully update it to 2
ELCALOR
i'm on 2 already ;)
nicobot has quit
khoapham has quit
SpeedUp has quit
momomomomo has quit
NullVoxPopuli has quit
bogdanbalc has quit
bogdanbalc joined the channel
g00glen00b joined the channel
how to use global variables in ember 2?
khoapham joined the channel
shamanime
ELCALOR: Aren't you interested in a service instead?
locks
ELCALOR: ^
ELCALOR
well, i'm just not sure. my use case is that i want to have a `lastActiveTime` variable available in my Application View
shamanime
Well I also need some help, been struggling with showing server side validation errors :(
ELCALOR
then i want to update that from within the ApplicationView when a user moves the mouse or keyDown
shamanime
I just am unable to display the errors returned by the server, seems like the model doesn't get "isValid: false" and model.errors is empty. Server answers with correct error object.
ELCALOR
then lastly i want to check if the difference between lastActiveTime and the current time is greater than X minutes
and logout the user
therefor i've built a `tick` function within the application controller
Weezey has quit
and so that should also have access to `lastActiveTime`
When I call model.save() I get this error: "The adapter rejected the commit because it was invalid" (expected because I have no catch for the error), then the "errors" is returned in a InvalidError, but model.errors is empty. What am I doing wrong?