Hey guys.
I created custom decorator to be able to apply some generic column
configuration to the model field, like:
export class MyModel {
@ColumnCfg({
header: 'Name'
})
name: string;
}
and I need this info in my grid component initialization to populate the
columns.
I googled around how to fetch property metadata and now I completely
confused. A lot of scenarious are based on ES6 Reflect API, but this
stopped working recently, as Angular team has changed their metadata
storage mechanism, Reflect.getMetadata() and other calls simply return
nothing now.
Then I've found Reflector and ReflectionCapabilities classes
inside @angular/core/src/reflection, and it seemed appropriate to my needs.
But there's another problem - Angular stopped supporting deep imports and
when I'm trying to:
import { Reflector } from '@angular/core/src/reflection/reflector';
I'm getting a compiler error:
Module not found: Error: Can't resolve '@angular/core/src/reflection/
reflector'
So now I'm completely stuck with it. Will be very grateful, if someone
point me in right direction how to use Reflector class, or how to fetch
property metadata in some other way. Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.