These are chat archives for FreeCodeCamp/HelpFrontEnd

7th
Sep 2018
jsjoe82
@jsjoe82
Sep 07 2018 00:34
Ah... found it out. I was missing having max-width: 100% in my img style >.<
Mandeep
@mandeephub
Sep 07 2018 05:01
@jsjoe82 nice
Dmytro Holysh
@dmk1111
Sep 07 2018 06:24
@NNeil1 probably you should add your stylesheet after css reset file
phao5814
@phao5814
Sep 07 2018 14:16
Hi everyone, would appreciate if someone with VueJS experience could help me out with this issue I’ve been having: https://stackoverflow.com/questions/52224343/how-can-i-avoid-running-a-function-more-than-once-when-vuejs-keep-alive-componen
niniyzni
@niniyzni
Sep 07 2018 16:43

hi,

  • I have a search engine code in angular2.
  • when I select the search results I need to display the values in the text box with cross button next to it.
  • right now I am getting the results.
  • but when I type alphabet h alone for first time I am getting some results, when I type m for second time I see some reults, but when I type h for third time I dont see nay results.
  • is it due to distinctUntilChanged method or can you tell me how to fix the bug.
  • providing my code and stack blitz below
  • can you please help me.
  • so that in future I can implement myself.

https://stackblitz.com/edit/angular6-jbnrru?file=app%2Fsearch-service.ts


search(terms: Observable<string>) {
    return terms.debounceTime(400)
      .distinctUntilChanged()
      .switchMap(term => this.searchEntries(term));
  }

  searchEntries(term) {
    return this.http
        .get(this.baseUrl + this.queryUrl + term)
        .map(res => res.json());
  }
Brad
@bradtaniguchi
Sep 07 2018 17:03
@niniyzni what should be returned when you give it hmh? Sounds like not an actual word...
niniyzni
@niniyzni
Sep 07 2018 17:25
@bradtaniguchi we should not do string concaetnation just it should behave in same way like when we compose gmail
Brad
@bradtaniguchi
Sep 07 2018 17:26
what?
niniyzni
@niniyzni
Sep 07 2018 17:26
like google search
when you type h first time delte from text box and type m and delete from text box and then type h...its doing string concatenation but it should show independently
Brad
@bradtaniguchi
Sep 07 2018 17:28
what do you mean show independently?
Brad
@bradtaniguchi
Sep 07 2018 17:35
I think I understand what your saying, basically when you delete the values they don't actually delete, as the results are changed
My guess is it has todo with how your passing the terms to your search method and how your calling the search methods. It seems fishing you need to pass terms to your search, and where and how you call search might be your problem
Neil
@NNeil1
Sep 07 2018 19:09
Building my portfolio, and want to know the best way to go about something. I want a div fixed at the bottom of my home page, at the very bottom of the users screen, but I only want it fixed on the homepage, not every other page. What's the best way to do this?
Would I just use Absolute positioning, and then keep changing it based on screensize
Eric Weiss
@eweiss17
Sep 07 2018 19:19
how are you setting up your site? doesn't the home page have it's own mark up
Neil
@NNeil1
Sep 07 2018 19:19
its a one page setup @eweiss17
I have each page wrapped in divs
Brad
@bradtaniguchi
Sep 07 2018 19:20
an SPA? Are you using a framework or something?
Neil
@NNeil1
Sep 07 2018 19:20
SPA?
And no framework
single page, yeah
Mandeep
@mandeephub
Sep 07 2018 19:47
Bootstrap Carousel Slide Motion Glitch(on the time of motion) ??? Any help
ehutchllew
@ehutchllew
Sep 07 2018 21:16
@NNeil1 Not entirely sure if this woould work, but create your div inside of your homepage container and set position: absolute and bottom: 0
might work?
the UX sounds like it's going to be super weird though, unless you have some animations that slowly dismiss it on scroll.
Neil
@NNeil1
Sep 07 2018 22:21
@ehutchllew decided to leave it, and not do it, changed my mind. But thanks for the help anyway
newmoon
@newmoon
Sep 07 2018 23:33
@mandeephub it helps to preload images before displaying the carousel
If that doesn't work, maybe share the code and we can take a closer look