Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 16 00:15
    3cp commented #39
  • Jan 16 00:14
    3cp opened #39
  • Jan 16 00:13
    3cp closed #34
  • Jan 16 00:13
    3cp commented #34
  • Jan 16 00:10
    3cp synchronize #34
  • Jan 15 23:39
    3cp synchronize #34
  • Jan 15 06:05
    tomtomau commented #37
  • Jan 14 22:47
    3cp commented #34
  • Jan 12 10:49
    mroeling opened #16
  • Jan 11 10:07
    zewa666 commented #54
  • Jan 11 09:18
    davidGrocerKey commented #54
  • Jan 11 09:09
    zewa666 commented #54
  • Jan 11 08:35
    davidGrocerKey commented #54
  • Jan 06 22:49
    bigopon commented #65
  • Jan 06 19:24
    josundt commented #65
  • Jan 06 04:01
    bigopon commented #598
  • Jan 05 07:25
    Ischca commented #598
  • Jan 05 07:24
    Ischca commented #598
  • Dec 31 2020 19:45
    CLAassistant commented #139
  • Dec 31 2020 19:45
    jwawrzyn opened #139
bigopon
@bigopon
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:
Caleb Cushing
@xenoterracide
yeah sure, I'll hop on over to discourse later
yeah, I've just been ramping up on the frontend
again
bigopon
@bigopon
:+1:
Pedro Silva
@pmanu93

@bigopon

@pmanu93 it's beause of value.bind="true"

No. Turns out its because I have a click event in the li that is wrapping those elements. (I use that to toggle a div inside the li which contains the checkbox above)..

Luis Lebolo
@lebolo

If I have a custom element and use the DOM remove() function on it, will the unbind() and detached() lifecycle hooks on its view-model be called? For example

const myCustomElement = document.querySelector('#myCustomElement');
myCustomElement.remove()

I'm trying to track down whether I'm doing this incorrectly or if I should not expect those lifecycle hooks to be called when an element is removed from the DOM in this way.

I can confirm that those lifecycle hooks get called when the element is in a route and I navigate away from the route.

Logan AAA Flag
@logan_aaaflag_gitlab
Hey bit of a long shot but I have a @processContent(...) decorator within which I'm trying to register a custom component (like this example in the docs https://aurelia.io/docs/templating/custom-elements#decorators-for-customizing-aurelia-custom-element-processing sandbox link https://codesandbox.io/s/p7wo71qrzj?from-embed )
But when I call resources.registerElement( "icon-list-item", instruction.type["viewFactory"].resources.getElement("icon-list-item") );
I get an error ERROR [templating] TypeError: Cannot read property 'resources' of undefined
Does anyone know under what circumstances the viewFactory can be undefined in a @processContent(...) handler?
Caleb Cushing
@xenoterracide
ARGH... this %#$@$@! bug, I'm gonna lose all my hair
now what makes Reflect.decorate happen...
donald-slagle
@donald-slagle
Is it possible to limit a route parameter? I've got a top level route that can take an id and I'd like to limit that route to just integers. I'm integrating vanity URLs for affiliates and that top level route is catching everything. I know in ASP.NET I can do something like [HttpGet("{id:int}")]. Having something like that would take care of it or being able to define a regex for a route param would also take care of it.
Caleb Cushing
@xenoterracide
@donald-slagle I thought you could, but I can't find anything that suggests anything other than these https://aurelia.io/docs/fundamentals/cheat-sheet#routing