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)

Frédéric van der Essen
@cb-fred
@SorenMuller I'd like to know that as well, having to register all node modules individually seems like a huge regression from existing build systems
Mikael Porttila
@MikaelPorttila
the old validation supported:
.ensure('model.patientCity')
.if(() => this.model.someBoolean)
.hasMaxLength(20).withMessage('Max 20 tecken')
.endIf()
Søren Müller
@SorenMuller
@cb-fred Yup.. Used to jspm with its oddsand ends.... But tearing my hair out with npm :-|
Mikael Porttila
@MikaelPorttila
found it! data-ignored attribute
Frédéric van der Essen
@cb-fred
@SorenMuller this is not normal, tools like browserify can figure all that automatically
robinchesterman
@robinchesterman
I'm just browsing around a first project created with the Aurelia CLI - what is it using for bundling? Doesn't look like Webpack...
Søren Müller
@SorenMuller
This message was deleted
Frédéric van der Essen
@cb-fred
does anybody knows how to load npm submodules with aurelia cli ?
Søren Müller
@SorenMuller
@smanaton Hi, Im kinda baffled by the lines
´´´
{
"name": "validate.js",
"path": "../node_modules/validate.js/",
"main": "validate"
},
Validate.js is not directly under node_modules, but without theses lines, it cant find validate.js ?!?
Can you explain why ??
robinchesterman
@robinchesterman
blob
blob
I'm getting the above errors when trying to run / build a TypeScript app with the Aurelia CLI
Faesel Saeed
@faesel
does anyone know whats the best way of of passing a MVC model property to an Aurelia APP?
Doug Kent
@dkent600
@faesel return from web service method as JSON. MVC is very good at doing the JSON conversion for you.
Faesel Saeed
@faesel
thanks
Manca
@MancaZerovnikMekuc
Hi. Is there any nice example of how to use services in aurelia? In which file it is nice to do the configuration of fetch client?
Andrew Albright
@m-andrew-albright

Can I not add properties to my router's navigation items? This doesn't seem to work:

parent.js:

export class Parent {
  configureRouter(config, router) {
    config.map([
      {
        route: ['','child'],
        name: 'child',
        moduleId: './child',
        nav: true,
        title: 'Child',
        class: 'icon-ion-briefcase'
      },
    ]);
  }
}

parent.html (see <i class.bind="nav.class">):

<template>
  <div class="content-panel">
    <ul class="tabs">
      <li class="nav-item" repeat.for="nav of router.navigation">
        <a class="nav-link" href.bind="nav.href"><i class.bind="nav.class"></i>&nbsp;<span>${nav.title}</span></a>
      </li>
    </ul>
    <router-view containerless></router-view>
  </div>
</template>
lndnbrg
@lndnbrg
@robinchesterman I am getting the exact same errors, but it is working anyway. on github, there is a open issue about that.
Andrew Albright
@m-andrew-albright
For whatever reason, it acts like there is no .class property; so I assume there is some other way to do this?
srfabio
@srfabio
@m-andrew-albright you want to use the settings parameter for that
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.