« first day (2311 days earlier)      last day (1477 days later) » 

7:01 AM
@TylerH :) morning
so i have this code
.container{
  display: flex;
  flex-direction:column;
  width: 80%;
  margin: 0 auto;
  height: 100vh;
  background-image: url(/images/tlo2.jpg);
  background-size: contain;
  background-position: center;

}
but i cant see background-image.
image is in the same folder as rest of html/css files
 
7:34 AM
when i add 'images/tlo2.jpg' at the end of web address the image appears. so the path is correct. @TylerH
 
 
5 hours later…
1:02 PM
@Ramona make a minimal demo for us if you'd like help
 
1:33 PM
@Ramona another way to test that it's not a path issue is to use a temp image hosted elsewhere (e.g. placekitten or something) -- you'll need to do this anyway if you want to get help from us here as we'll need to see a reproduction demo as Zach mentioned; you can paste your HTML and CSS into a blank demo at jsfiddle.net or similar site
 
C4d
1:57 PM
Hello guys. Is there anyone who has experience with angular? The web-rooms on SO are quite empty. :(
 
 
C4d
Ill just describe whats going on: I've got a method that returns an object with calculated values (lets say x and y). I want to display them in a component side by side without binding it like <span>{{calc().x}}</span> and <span>{{calc().y}}</span> because that would obvisouly execute the function twice. Can I in any way bind the function return to a parent div and access the value x and y on the children?
 
@C4d the nature of chatrooms is often that people stop by every so often to catch up, unless there's a discussion going on right then and there
as for Angular, I don't have any experience with that (and this room probably isn't the best place to look for help since it's an HTML/ CSS room, not a JS Framework room). But it look slike you're already in the best chatroom for help - the JS room
 
C4d
@TylerH well as its also titled WebDesign along with HTML I felt like the JS room would be even worse.
But thanks for clarifying that.
 
Sure, but I don't see how 'Web Design' relates to Angular
Maybe if you mean architectural design but that's not what is meant
this is a "front end" room, so to speak. Anything that needs to be compiled to work is typically outside of scope (except some folks here might be able to help with SCSS and Less) of our knowledge/domain
 
C4d
2:11 PM
I dont think a philosopical explanation why I think so would help in any way ^^. I havent used both of this rooms ever really seriously so I dont know how the community is treating this rooms. This answer of yours is clear to me.
 
@C4d I pinged someone with Angular experience -- hopefully they will be able to stop by and take a look at your question
 
o/
 
C4d
Thank you very much :)
Hole crowd incoming.
 
@C4d Does calc() need to be an observable?
 
C4d
@Vega Luckily not.
I thought about something like this <div element="calc()"> <span>element.x</span><span>element.y</span> </div>.
 
2:33 PM
I don't see the rest of the code, obviously, I would make a supposition (and simplification). Call calc() in ngOnInit(), keep the value in a property, say calcObject:{x:number,y:number}, then {{calcObject.x}} and {{calcObject.y}}. Does this make sense?
 
C4d
It makes sense and I was afraid of getting this told.
 
Do you have constraints for not doing that way?
 
I'm not sure if he means he was afraid that would be the answer because he can't do it that way, or if he means he was afraid he was missing something obvious/sensible :-P
 
@TylerH aaah :) thank you!
 
We'll know for sure if/when he responds again, I suppsoe
 
C4d
2:37 PM
Unfortunately the calculation is dependend on data that gets manipulated from different places at runtime. This then is a big question about the lifecycle and how rerendering happens in angular.
@TylerH Yeah it is rather option 1 instead of 2.
I think I'm just a bit dumb about this because of the mass of code.
 
@C4d if you can dump more of the code into a jsfiddle.net page it may help Vega or someone provide a more-informed response
 
C4d
Already thinking hard about an example.
 
If you use @Output() with eventemmiter in the child, the parent component would be aware of changes and update calcObject
@C4d I will try to make stackblitz demo
 
C4d
Wait
Give me one try to get it written down in a simple form.
I've got a table thats bound to incomingData. You can filter (front-end filtering) directly on the table. The table emits an event filterChanged that passes back all remaining lines of data.
Simple until here I think.
Now I got 2 statistical values about the data on top. This should show comulated values based on the visually existing data. Hence filteredData ? filteredData : incomingData.
I know I can execute calc() after every filtering everywhere in the code. Im not sure if thats ideal.
 
3:07 PM
@C4d So the filtering is done in the child component, and each time it's done, the parent runs calc()?
 
C4d
@Vega Everything described happens within one component.
I now started as you suggested in the beginning. calc() sets a global object which is bound. Im currently spreading calc() across all the filter functions that are accessing the data.
Either I'm too blind to see that bottleneck or there is no bottleneck where I could execute calc() one time to cover all filters.
public data: Object[];

ngOnInit() {
	data = services....getData();
}

onFilterA_Click() {
	this.data = data.filter(x =>...);
	calc();
}

onFilterB_Click() {
	this.data = data.filter(x =>...);
	calc();
}

onFilterC_Click() {
	this.data = data.filter(x =>...);
	calc();
}
Until eternity.
Ignore that I forgot calc()s result on the top.
 
3:30 PM
@ZachSaucier @TylerH hi guys. thank you. here is the code. can't see the background image.
 
@Ramona right, since it's an online demo we'll need to use a placeholder image
you also have some invalid HTML
<img> elements are self-closing
See jsfiddle.net/Lk8mo5f2 - I used a placeholder image URL instead of your relative local filepath, and also fixed the HTML invalidity
Even without fixing the HTML invalidity, the placeholder image URL works
so that leads me to believe your issue actually is with your relative file path
 
@C4d It's not really the same problem as you described above, right? You need either a pipe either a directive with parameters of the filtering. Then you can filter the data and run calc() at once {{data | myfilter: 'filterA'}}, etc..
 
4:13 PM
@TylerH checking...
when i add this line to html
<img src="images/z.jpg" class = "image" alt="third"/>
it is working
BUT
it is not if I do in css
hmm, strange.
@TylerH
background-image: url(images/z.jpg); - when i click it when in css, the image opens.
 
 
6 hours later…
10:51 PM
can someone please help me understand why this doesn't work? jsfiddle.net/zt760cog
 
11:23 PM
nevermind I need to use last-of-type
 

« first day (2311 days earlier)      last day (1477 days later) »