11
Forside
6y

Just came across this in a website project of my company.... and it goes on for about 5 times of that. But it's not in the html code, guess it comes from some js framework. Not sure if bug in framework or bad code in website.

Comments
  • 0
    Isn't this something react.js does?
  • 1
    @localjoost We are apparently using knockout.js.
  • 1
    @Forside I thought knockout was just endif. And this is the wrong way of using it. But it's still a very useful feature as it keeps the JavaScript cleaner and should be bound to an observable to update dynamically.
  • 1
    @Wozza365 I don't know much about knockout, but the bindings seem ok. Looks pretty much like react, angular and whatever alike. No idea why there are so many frameworks doing the same.
  • 1
    @Forside knockout I believe is a lot smaller than angular etc as it's not really designed to be used for full web applications, just not dynamic pages. It's super easy to use and set up, great if you are doing a smaller website but want something better than jQuery.
  • 0
    @Wozza365 We are also using jQuery 😄
  • 0
    @Forside yeah occasionally jQuery is still necessary, but it reduces usage and makes JavaScript more readable. We have some pages without knockout and it's all just jQuery selectors and it's unreadable.
  • 2
    At least you can be sure, that your if has ended.
Add Comment