Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Feb 22 16:49

    bigopon on master

    chore(readme): update install i… (compare)

  • Feb 22 16:47
    bigopon commented #90
  • Feb 22 09:56
    milkshakeuk commented #90
  • Feb 22 02:02

    EisenbergEffect on master

    docs(backers): new wood backer (compare)

  • Feb 17 11:07
    bigopon commented #293
  • Feb 17 09:18
    Esger commented #293
  • Feb 15 16:30
    RicardoMoraisPOR commented #700
  • Feb 15 01:28

    EisenbergEffect on master

    doc(backers): new one time back… (compare)

  • Feb 12 13:58
    elitastic commented #69
  • Feb 12 10:47
    ckotzbauer commented #166
  • Feb 12 10:42
    graycrow commented #166
  • Feb 12 10:40
    graycrow commented #166
  • Feb 12 01:58
    dkent600 commented #172
  • Feb 09 05:11
    ckotzbauer commented #169
  • Feb 08 17:12
    jods4 commented #169
  • Feb 08 15:56
    ckotzbauer commented #169
  • Feb 06 02:26
    3cp commented #1188
  • Feb 05 11:56
    hiaux0 commented #138
  • Feb 05 10:33
    hiaux0 edited #140
  • Feb 05 10:32

    hiaux0 on 1.0.7

    chore(release): release v1.0.7 (compare)

Alfred Lopez
@alfredlopez

Thanks @TonyLugg I was looking for a way to listen to manually dispatched events that aren’t necessarily bound to an element. So if the code has something like

window.dispatchEvent(new CustomEvent(‘dateChanged’,newDate));

I guess, based on your example, I can do

this.addEventListener(‘dateChanged’, this.dateChangedListener);
WisdomCorp
@WisdomCorp
For breeze.Net core Aurelia demo please put your vote.
Breeze/northwind-core-ng-demo#11
Michael L. Gantz
@gantzm
When I'm using a template with a slot, can the slot contents have an input field with the value bound the view model? I.e. I have a view (view-a) with a view model (vm-a), the view has an input field who's value is bound to a field in vm-a. I create a template (tmp-a) that has a slot in it. In view-a I wrap the input element in tmp-a. The binding seems to break at that point.
TonyLugg
@TonyLugg
@alfredlopez Yes exactly. You can listen to a custom event similar to a DOM event. You may need to listen based on where the event was dispatched from (dispatchEvent).
Alfred Lopez
@alfredlopez
@TonyLugg Thanks!
TonyLugg
@TonyLugg
@alfredlopez There is also PLATFORM.global.addEventListener which can be used to listen for global events.
Alfred Lopez
@alfredlopez
ic
Mitch Davis
@CapnKernel
Hello. I'm completely new to Aurelia. I like what I see. Q: Does Aurelia support push notifications, that is, when data on a server changes, those changes can be pushed to the browser, received by Aurelia and processed?
Alfred Lopez
@alfredlopez

I just read the documentation regarding function references and I’m a bit confused about callbacks with parameters. Here’s my confusion:

In my parent view, I can have the following:

<my-custom-comp callback.call=“myParentFunction(paramA, paramB)” … >

1) I’m assuming that paramA and paramB are actually bindable fields, but are they of the parent or of the custom element?
2) If they are of the parent, how are they accessed in the custom element so that it can call callback({paramA: <first passed value>, paramB: <second passed value>})
3) If they are of the custom element, then I’m going to assume that I can make the call like callback({paramA: this.paramA, paramB: this.paramB})
4) How is myParentFunction defined in the parent? Like so?

myParentFunction(arbitraryParamNameA, arbitraryParamNameB)

Thanks!

Alfred Lopez
@alfredlopez

Ok…so I searched through discourse and found this post —> https://discourse.aurelia.io/t/call-function-from-custom-element/1793

Which kinda answres my question. Thanks y’all! :-)

TonyLugg
@TonyLugg
@alfredlopez Basically, call parameters are specified and named the same as the parameters in the function you are calling. I've also used bind with a function to allow less concise parameter matching.
robinchesterman
@robinchesterman

Hi all - this is a sort of Aurelia-related question. If you look inside a lot of node_modules package folders - let's take aurelia-fetch-client for example - in the dist folder there are various targets, e.g. amd, commonjs, system, 2015, umd, etc. My question is, how does a bundler e.g. webpack choose which one to load? Is it a webpack thing, or a tsconfig thing (I'm using TypeScript). I'm really hazy on which part of the toolchain is doing this.

My problem is I have a bundle that's broken in IE11. I can see that its contents includes code straight out of aurelia-pal-browser/dist/es2015 which IE is not going to handle very well.

bigopon
@bigopon
@CapnKernel totally, but that is up to user land code and how they implement it. If you want some examples from folks who had done it before, maybe post your Q on discourse https://discourse.aurelia.io, its our main forum for Q now
@robinchesterman if you are using webpack, you probably are using AureliaWebpackPlugin, which has an option for you to configure the dist
typically it would look like this:
new AureliaPlugin({
  dist: 'es2015'
})
try search in your webpack.config
John Stephenson
@jfstephe
@EisenbergEffect @davismj - Mornin' gents, can you please take a look at the stateful router PR that's been hanging around for ages. Creates so much pain and is a sought after feature (not just by us). aurelia/router#538
dpk-kakkar
@dpk-kakkar

Hello @bigopon , I have a component which has a css in require that is overriding some of the core bootstrap classes..
now since I am opening this component in new tab, it is not overriding style for other pages
--- this is existing functionality ---
now I have to use this same component in a dialog and when I am loading this component in dialog it is overriding styles for the whole page - colors fonts etc.

how can I stop this. Any help will be appreciated.

dagtveit
@dagtveit
anyone here know how to fix the audience empty is invalid with aurelia-authentication and identity server
bigopon
@bigopon
@dagtveit maybe try discord chat? We encourage you to start new chat there https://discord.gg/MfzdX9s or our discourse forum
Pedro Silva
@pmanu93
Hi, what could be the issue when a checkbox with checked.bind doesn't want to change value? I click but the state does not change.. :/
bigopon
@bigopon
do you have a click/mouse down listener on that checkbox?
or could be something like that that prevent the default of the checkbox, or maybe you have a typo in the bound property
Pedro Silva
@pmanu93
nope. The code is this:
<label for="enable_${subAuthDef.id}">Ativo:</label> <input id="enable_${subAuthDef.id}" type="checkbox" value.bind="true" checked.bind="subAuthDef.enabled"/>
and its inside a loop.. dont know if it has something to do about it -.-'
Its really weird
bigopon
@bigopon
@pmanu93 it's beause of value.bind="true"
you meant model.bind?
Mason Mize
@starr0stealer
Has anyone used monaco-editor with Aurelia CLI RequireJS builds? Trying to add this to my project but can't seem to figure out how to configure aurelia.json so I can use the library
bigopon
@bigopon
@starr0stealer if you use the latest cli bundler, aurelia.json is no longer needed. it's simpler to configure everything
also for your Q, you have higher chance to get fast answer in our discord forum https://discord.gg/MfzdX9s for chat, or discourse for forum like conversation/thread https://discourse.aurelia.io
Caleb Cushing
@xenoterracide
is aurelia 2 based on aurelia 1? like is it just a significant code refactoring? or is it a complete rewrite? anyone played with it? is it "stable"? I'm specifically interested in @aurelia/kernel because I'm looking for an alternative DI for node, and I don't think I want to install everything in aurelia-framework v1
also is @aurelia/debug going to improve kernel errors? or is it more for runtime things like templates
bigopon
@bigopon
@xenoterracide DI in v2 is an enhancement of v1 DI. and is like v1, it can be used anywhere
v2 is aimed to retain 90% of app code. And if you touch lower level API, then there will be work needed, otherwise, it's just plain old your app and your business logic
in anyway, feel free to open a discourse topic to ask more about DI
Caleb Cushing
@xenoterracide
already the error messages seem better than tsyringe, which is the other decent DI I found for node
bigopon
@bigopon
or join Discord forum for a quick chat, we are migrating the community there
Caleb Cushing
@xenoterracide
it was like, hey you did something stupid... on this line, actually useful
bigopon
@bigopon
nice, maybe share that small details, but nice quality of life too? on discourse? we lack those chats, and would love them :smile:
Caleb Cushing
@xenoterracide
I'm going to try to write a decorator, @registry like in tsyringe, I wonder if you guys would be interested
bigopon
@bigopon
can you give an example
Caleb Cushing
@xenoterracide
import { singleton } from '@aurelia/kernel';
import { LoggingWinston } from '@google-cloud/logging-winston';
import { instanceCachingFactory, registry } from 'tsyringe';
import winston, { format, Logger, LoggerOptions, transports } from 'winston';

export const LoggerDefault = 'defaultLogger';
export const LoggerTypeOrm = 'typeormLogger';
export const LoggerSecurity = 'securityLogger';
export const LoggerSecurityChild = 'childSecurityLogger';

@registry([
  { token: LoggerDefault, useFactory: instanceCachingFactory(createDefaultLogger) },
  { token: LoggerTypeOrm, useFactory: instanceCachingFactory(createTypeOrmLogger) },
  { token: LoggerSecurity, useFactory: instanceCachingFactory(createSecurityLogger) },
])
export class LoggerProvider {}

export function createDefaultLogger(): Logger {
  const config: LoggerOptions =
    process.env['NODE_ENV'] === 'development' ? devConfig() : serverConfig();

  return winston.loggers.add(LoggerDefault, config);
}

function createTypeOrmLogger(): Logger {
  const config: LoggerOptions =
    process.env['NODE_ENV'] === 'development' ? devConfig() : serverConfig();

  return winston.loggers.add(LoggerTypeOrm, config);
}

function createSecurityLogger(): Logger {
  const config: LoggerOptions =
    process.env['NODE_ENV'] === 'development' ? devConfig() : googleConfig();
  return winston.loggers.add(LoggerSecurity, config);
}

function devConfig(): LoggerOptions {
  const console = new transports.Console({
    level: process.env.LOG_LEVEL || 'info',
    debugStdout: true,
    format: format.combine(format.cli(), format.splat(), format.simple()),
  });
  return {
    transports: [console],
    exceptionHandlers: [console],
  };
}

function googleConfig(): LoggerOptions {
  return {
    transports: [
      new LoggingWinston({
        projectId: process.env.GOOGLE_SERVICE_ACCOUNT_PROJECT_ID,
        credentials: {
          client_email: process.env.GOOGLE_SERVICE_ACCOUNT_CLIENT_EMAIL!,
          private_key: process.env.GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY!,
        },
      }),
    ],
  };
}

function serverConfig(): LoggerOptions {
  return {
    transports: [
      new transports.Console({
        level: process.env.LOG_LEVEL || 'info',
        debugStdout: true,
        format: format.combine(format.splat(), format.simple()),
      }),
    ],
  };
}
from what I can tell for most of our use cases it's basically Registration.callback, Registration.instance, Registration.somethinglikeToken
etc
basically all the functionality is already there, this is just some syntactic sugar
bigopon
@bigopon
that looks pretty nice, maybe a discourse topic please? :smile:
please help sharing, our community has too many dark matter devs, no one shares anything :smile: