Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 24 15:34
    Alexander-Taran commented #167
  • Nov 22 20:27
    dependabot[bot] labeled #158
  • Nov 22 20:27
    dependabot[bot] opened #158
  • Nov 22 20:27

    dependabot[bot] on npm_and_yarn

    build(deps): bump engine.io and… (compare)

  • Nov 22 19:10
    dependabot[bot] labeled #573
  • Nov 22 19:10

    dependabot[bot] on npm_and_yarn

    build(deps): bump engine.io and… (compare)

  • Nov 22 19:10
    dependabot[bot] opened #573
  • Nov 22 19:10
    dependabot[bot] labeled #83
  • Nov 22 19:10
    dependabot[bot] opened #83
  • Nov 22 19:10

    dependabot[bot] on npm_and_yarn

    chore(deps): bump engine.io and… (compare)

  • Nov 22 19:06
    dependabot[bot] labeled #45
  • Nov 22 19:06
    dependabot[bot] opened #45
  • Nov 22 19:06

    dependabot[bot] on npm_and_yarn

    build(deps): bump engine.io and… (compare)

  • Nov 22 19:04
    dependabot[bot] labeled #425
  • Nov 22 19:04
    dependabot[bot] opened #425
  • Nov 22 19:04

    dependabot[bot] on npm_and_yarn

    chore(deps): bump engine.io and… (compare)

  • Nov 22 15:21
    dependabot[bot] opened #222
  • Nov 22 15:21
    dependabot[bot] labeled #222
  • Nov 22 15:21

    dependabot[bot] on npm_and_yarn

    chore(deps): bump engine.io and… (compare)

  • Nov 22 06:09

    dependabot[bot] on npm_and_yarn

    (compare)

Andrew Albright
@m-andrew-albright
Ah, so settings.class then?
srfabio
@srfabio
settings: { class: something, other: somethingElse}
Andrew Albright
@m-andrew-albright
Thanks!
srfabio
@srfabio
@m-andrew-albright You're welcome!
Andrew Albright
@m-andrew-albright
:+1: that did it
smanaton
@smanaton

@faesel you can use

Object.assign(this, data);

where this is the viewmodel and data is your json model to save creating all the properties on your vm, you might already know this but i didnt and it saved me a bunch of work on large viewmodels

Ivan Zderadicka
@izderadicka
What is the best way to use router programatically to initiate navigation from JS - can it be passed via DI? How pass additional parameters to VM activate method?
smanaton
@smanaton
@SorenMuller sorry, no idea, i havent got around to using it yet
Faesel Saeed
@faesel
@smanaton thanks, i didnt know that either
Raimo Pitkänen
@rapitkan
Hi! How can I unit test private functions of ViewModel?
Josh McCullough
@JoshMcCullough

Hello everyone. Got a question...
When using <compose>, is there any way to provide a default view to render in the case that the dynamic view/model specified on the element does not exist? E.g....

<compose view="view-that-does-not-exist.html" view-model="vm-that does-exist.js"></compose>

Since the view does not exist, a 404 occurs while loading it. I want to catch this case (also for the VM), and swap out the view/VM with our custom "not found" view. Is it possible?

Ricky Blankenaufulland
@ZoolWay
What about wrapping it in a <div if.bind="isViewExisting">?
jeffgrann
@jeffgrann
To get the current route within a non-view-model class, would the best practice be to inject the Router and use this.Router.history.fragment? Or is this a no-no?
Josh McCullough
@JoshMcCullough
@ZoolWay How would I know how to set isViewExisting? I'd have to fetch the resource on my own to determine that. I was hoping to hook into the composition mechanism somehow instead.
Ricky Blankenaufulland
@ZoolWay
@JoshMcCullough If its like completly unknown before, yes, I cannot help with that at the moment. In my case I can check all possibilities in the viewmodel
Josh McCullough
@JoshMcCullough
Yeah, the view/VM in our case is user-specified so it could even have a typo in it, for instance. In those cases we're swapping it out with a "not found" view. Thanks.
Ricky Blankenaufulland
@ZoolWay
I understand. Sorry, no idea at the moment.
Dwayne Charrington
@Vheissu
@tomtomau The approach I take these days is:
src/

    common
        interfaces
        ...
        ...

    modules
        someFolderMatchingARoute
            module-file.ts
            module-file.html
            module-style.scss

    services

    styles
I also have a resources folder inside of src which is where I put my shared custom elements, attributes, value converters, etc.
I use a modules directory and each sub folder matches a route. So /dashboard/users would be: /src/modules/dashboard/users/index.ts, /dashboard/users/view/123 would be: /src/modules/dashboard/users/view.ts behind the scenes and so on.
I like this approach because each module has its own stylesheet, there is a global stylesheet, but each component defines its own unique styles. Then it is imported from within the component.
Eventually I would like to move my tests into each module directory as well so everything is together.
Jaswanth75
@Jaswanth75
Hi all. When I try to unit test using karma-jspm, it is throwing 404 error. Can anyone please help me how to fix it ? Past couple of days I have been working on it and couldn't get proper solution to fix it. Any help would be greatly appreciated.
Ricky Blankenaufulland
@ZoolWay
@Vheissu How do you import a service from src/services in src/modules/someFolderMatchingARoute/module-file.ts ?
Jason Sobell
@jsobell
@ZoolWay ../../services/whatever
Ricky Blankenaufulland
@ZoolWay
Yeah, I am trying that for two working days now, should be that easy but seems I broke my module loading in some way.
Import, new and compiling works. But DI not.
So basically this?
import { MyService } from '../../services/my-service';
constructor(private myService: MyService) {
}
Jason Sobell
@jsobell
Yep, looks OK to me
Ricky Blankenaufulland
@ZoolWay
Thanks for the confirmation.
Guess I'll try to find out what is going wrong. DI with imports from the current folder and its subfolders work, but not when going to parents...
Thought of an error in DI but @EisenbergEffect denied ( aurelia/dependency-injection#104 ). Trying to provide a minimal example.
McOffsky
@McOffsky
Hey guys, is there any specific way to include submodules in aurelia webpack esnext 1.0.0-beta-2.0.0? Was trying to load it like in 1.2.5: plugins: [ new AureliaWebpackPlugin({ includeSubModules: [] }) ]
But it doesnt seem to work.
robinchesterman
@robinchesterman
I've started getting a lot of TypeScript compiler errors coming from aurelia-fetch-client.d.ts - Cannot find name Response, Cannot find name Request etc. I've just switched to having moduleResolution: "node" as mentioned in the RC blog post.
zodraz
@zodraz
anyone can help with this ? Error on translate for npm:aurelia-binding@1.0.0-beta.1.2.2/aurelia-binding.d.ts at file:///C:/tfs/trunk/src/PIM/LeCreuset.PIM.Web/pim-app/jspm_packages/npm/aurelia-binding@1.0.0-beta.1.2.2/aurelia-binding.d.ts
Manca
@MancaZerovnikMekuc
where should I configure aurelia-fetch http-client? Probably it is not good to that in every service again?
McOffsky
@McOffsky
@MancaZerovnik Im doing it in app.js, its loaded on every page.
Manca
@MancaZerovnikMekuc
@McOffsky Thank you
Damiano Fusco
@damianof
@jsobell @EisenbergEffect Is the old one within the same repository/branch? I might have to pull it down since there is not more demo hosted on http://aurelia.io/validation/ and we need to complete what we have done over 1 year of work and go to production with that. We can not afford a refactoring at this time.
Andrew Albright
@m-andrew-albright
If I have an aurelia-fetch-client HttpClient configured with a given base URL, is it easy to make a request that ignores the base URL (just for this one request) without reconfiguring it?
Manca
@MancaZerovnikMekuc
@McOffsky Are you doing it in constructor method?
McOffsky
@McOffsky
@MancaZerovnik yes, like that: this.fetch.configure(config => { config.withBaseUrl(Config.baseUrl); });
Manca
@MancaZerovnikMekuc
@McOffsky ok, thank you!
Ricky Blankenaufulland
@ZoolWay
Finding bugs in module loading is hard :worried: Solved aurelia/dependency-injection#104 - of course my fault
Adam Willden
@AdamWillden

Hi I seem to have an issue and I don't know how to work around it. I have a checkbox which enables and disables an alarm. The checkbox is bound to a property enabled with the following changeHandler:

  enabledChanged(isEnabled) {
    if (!isEnabled || (this.upperLimitValid && this.lowerLimitValid)) {
      return;
    }

    this.enabled = false;
  }

Note that if it doesn't pass validation for the alarm limits I set it back false. This change is not picked up in the view, the checkbox appears ticked. I guess I can't change the value from within it's own changeHandler??

Generic_User
@genericuser-me
is there any way to get metadata of any object? like how we can do it using reflection in .net
Andrew Camilleri
@Kukks
@genericuser-me what do you need done?
Generic_User
@genericuser-me
I want to get properties of the model at runtime
or an object
Andrew Camilleri
@Kukks