Comments (8)
aha π¦
I needed to use
this.get('router')
instead of
this.router
from ember-decorators.
That should not be the case, which version of Ember are you using?
from ember-decorators.
@pzuraq I've run into this as well, testing the latest Ember Octane.
"ember-source": "https://s3.amazonaws.com/builds.emberjs.com/canary/shas/707a938e536cb921dbe80ee270c431d1b9717e38.tgz",
"ember-decorators": "5.1.4",
All ES6 classes are affected it looks like; doesn't matter what Ember class it extends from (EmberObject, Route, Controller, Service, and Component are the ones I've run into it with)
from ember-decorators.
@pgrippi can you provide the version of @ember-decorators/babel-transforms
you are using? And if itβs not too much trouble, the code of the class itself? That would help a bit in figuring this out
from ember-decorators.
Sure, I'm using (figure it can't hurt to throw the babel version in too):
"@ember-decorators/babel-transforms": "5.1.4"
"ember-cli-babel": "7.6.0"
As for the code, the simplest case is in my application route:
import Route from '@ember/routing/route';
import { inject as service } from '@ember-decorators/service';
export default class ApplicationRoute extends Route {
@service router;
init() {
super.init(...arguments);
this.router.on('routeDidChange', () => {
console.debug('route did change');
});
}
}
from ember-decorators.
alright, I'll see if I can get a reproduction going. For reference, you should be using the stage 1 versions of the transforms:
"@ember-decorators/babel-transforms": "2.1.2"
We're working on baking these into ember-cli
at the moment, I realize this is confusing. If you use the stage 1 transforms, do you have the same problem?
from ember-decorators.
Is there anything else I have to do to use stage 1 other than downgrading @ember-decorators/babel-transforms
to 2.1.2? After downgrading to 2.1.2 I still see the issue
from ember-decorators.
I believe this should be fixed on the latest ember-decorators, with the polyfill. Let us know if not!
from ember-decorators.
Related Issues (20)
- v5.2 MS Edge 18: Object doesn't support property or method 'apply' HOT 19
- Mixin pattern for polymorphic relationships doesn't seem to work with native classes HOT 1
- @service decorator fails on older browsers like IE11, Chrome 41 (Googlebot) HOT 8
- Polyfills for Symbol, Array.find are required to run on older browsers like IE11
- `@sort` deprecation message missing replacement code HOT 3
- TypeError: Ember._setComputedDecorator is not a function HOT 7
- ember-data decorators HOT 2
- ember-typescript-cli v2 HOT 6
- Question: why is @ember-decorators/babel-transforms still referenced in v6? HOT 2
- attribute component decorator receiving array instead of string HOT 2
- `@service` decorator doesn't work with ember 3.10.0 HOT 9
- `@layout` decorator doesn't work in ember addon HOT 5
- 5.1.4 / 5.2.0 not compatible with iOS 9.3.5 HOT 3
- Recommend usage of `ember-cli-dependency-lint`
- Detect when incompatible versions of `ember-decorators` are clobbering one another
- Add @classNameBindings and @attributeBindings class decorators HOT 2
- 6.1.0: @classNameBindings and @attributeBindings
- Build error: Generic type 'AttrOptions<T>' requires 1 type argument(s).
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-decorators.