Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 22:56
    dependabot[bot] labeled #56
  • 22:56
    dependabot[bot] opened #56
  • 22:56

    dependabot[bot] on npm_and_yarn

    chore(deps): bump decode-uri-co… (compare)

  • 21:59
    dependabot[bot] labeled #61
  • 21:59
    dependabot[bot] labeled #75
  • 21:59
    dependabot[bot] labeled #203
  • 21:59
    dependabot[bot] opened #61
  • 21:59

    dependabot[bot] on npm_and_yarn

    chore(deps): bump decode-uri-co… (compare)

  • 21:59
    dependabot[bot] opened #75
  • 21:59
    dependabot[bot] labeled #89
  • 21:59
    dependabot[bot] opened #203
  • 21:59

    dependabot[bot] on npm_and_yarn

    chore(deps): bump decode-uri-co… (compare)

  • 21:59

    dependabot[bot] on npm_and_yarn

    chore(deps): bump decode-uri-co… (compare)

  • 21:59
    dependabot[bot] opened #89
  • 21:59

    dependabot[bot] on npm_and_yarn

    build(deps): bump decode-uri-co… (compare)

  • 21:59
    dependabot[bot] labeled #50
  • 21:59
    dependabot[bot] opened #50
  • 21:59

    dependabot[bot] on npm_and_yarn

    chore(deps): bump decode-uri-co… (compare)

  • 21:03
    dependabot[bot] labeled #57
  • 21:03

    dependabot[bot] on npm_and_yarn

    chore(deps): bump decode-uri-co… (compare)

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.
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.