-
Notifications
You must be signed in to change notification settings - Fork 46
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
adding a new property to @Component decorator #197
Comments
I'm not 100% sure of this. But angular2 has a style property for components. I never tried to use it with angular2 or ng-metadata. But maybe it already works with ng-metadata like with angular2. If not the angular2 syntax should be used and then angular-css should not be needed anymore. |
The styles property from ng-metadata does nothing for components that I can tell. It's purely there to conform to the angular 2 spec. I dove deep into the code and could also find no evidence that it does anything. |
I wonder if the legacy option passes through the options to the directive configuration. I would assume not but it is worth a try. {
selector: 'divNg',
templateUrl: 'tmpl.html',
legacy: {
css: 'styles.css'
}
} |
I'm working on some code based on angular-css that will load and isolate
css. It would be great if there is a way to get the stylesUrl or styles
property from the @component directive.
I wonder if they'd accept a pull request of such a feature.
…On Wed, Mar 1, 2017, 10:02 AM Anthony Ciccarello ***@***.***> wrote:
I wonder if the legacy option passes through the options to the directive
configuration. I would assume not but it is worth a try.
{
selector: 'divNg',
templateUrl: 'tmpl.html',
legacy: {
css: 'styles.css'
}
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#197 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAavtN51EAyYffhM8lcsds4JJ9OYYWH1ks5rhZaTgaJpZM4MMwr6>
.
|
I know you can get the metadata pretty easily. I think they'd be open to a PR assuming it doesn't cause build problems for other people. |
I'm trying to use angular-css to add scoped component css to a project using ng-metadata, but I'm hitting a wall.
angular-css needs a
string | string[]
property on thecomponent
initialization. Like so;This is proving troublesome because the
@Component
decorator doesn't allow this property. Is there any way around this?The text was updated successfully, but these errors were encountered: