New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get parsed data ( key -> value) of Class Decorator #99
Comments
Hey @knlodha What you could do: search for the classes (and therefore the files) that have components in them and then use a string search to parse those elements. |
Hi @buehler , Angular Code: where I need individual objects like the one highlighted above, string parsing becomes more complex. Why I can't get the values of variables like routes using typescript parser. I can see, I only get the datatype. Is there any other way to get such information. Also, do we have something like esprima ( http://esprima.org/ )for typescript code. |
Hi @buehler ,
I can see that, I am not getting parsed data for class decorator. How can I get this data provided in decorator. I am using it for angular files
e.g.
import { Component } from '@angular/core';
@component({
selector: 'app-root',
template:
<h1>{{title}}</h1> <h2>My favorite hero is: {{myHero}}</h2>
})
export class AppComponent {
title = 'Tour of Heroes';
myHero = 'Windstorm';
}
Here , I need selector and template values from decorator. Is there any way / configuration to get this data using parseSource or parseFile ?
The text was updated successfully, but these errors were encountered: