question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom configuration is ignored when decorators are used

See original GitHub issue

Version: ngx-webstorage@1.8.0

I have configured ngx-webstorage to use a custom prefix and separator. Ng2Webstorage.forRoot({ prefix: 'my_custom', separator: '.', caseSensitive: true }),

  1. When I use the decorator like this: @LocalStorage('test') private i:string; Actual result: ng2-webstorage|test = null Expected result: my_custom.test = null

  2. When I use the decorator like this: @LocalStorage('test', 'hello') private i:string; Actual result: ng2-webstorage|test = 'hello' Expected result: my_custom.test = 'hello'

  3. When I use the decorator like this: @LocalStorage('test') private i:string = 'hello; Actual result: ng2-webstorage|test = null my_custom.test = 'hello' Expected result: my_custom.test = 'hello'

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
owen26commented, Jul 11, 2017

I’m having the same issue. It looks like something is wrong during the initialisation of this package. Default configurations been applied before custom configurations take effect.

2reactions
svitlychnyicommented, Nov 8, 2017

@PillowPillow works like a charm 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Decorators - TypeScript
If the accessor decorator returns a value, it will be used as the Property Descriptor for the member. NOTE The return value is...
Read more >
How To Use Decorators in TypeScript - DigitalOcean
Decorators are a way to decorate members of a class, or a class itself, with extra functionality. This tutorial covers creating decorators ......
Read more >
Experimental decorators warning in TypeScript compilation
I've to add the following in the settings.json file of vscode to remove the warning. "javascript.implicitProjectConfig.
Read more >
Advanced Uses of Python Decorators | Codementor
This tutorial aims to introduce some more interesting uses of decorators. Specifically how decorators can be used on classes, and how to pass ......
Read more >
Creating Custom @task Decorators - Apache Airflow
As of Airflow 2.2 it is possible add custom decorators to the TaskFlow interface from within a provider ... If image tag is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found