MikeMitterer / dart-material-design-lite

Material Design Lite Components, Directives + SPA with HTML, CSS + Dart
http://www.material-design-lite.pub/
Other
228 stars 26 forks source link

interop with angular_components #45

Closed aPaleBlueDot closed 6 years ago

aPaleBlueDot commented 6 years ago

I'm a beginner in Dart, so the following is probably a rookie question:

Not sure if this is in fact an issue, but adding

import 'package:mdl/mdl.dart';

creates a conflict with

@Component( selector: 'my-app', templateUrl: 'app_component.html', styleUrls: const ['app_component.css'], directives: const [ MaterialTreeDemoComponent, ], providers: const [ popupBindings, ], )

What could I be doing wrong?

aPaleBlueDot commented 6 years ago

To be more specific, the conflict is an error message on WebStorm, which says: "Annotation must be either a const variable reference or a const constructor invocation."

aPaleBlueDot commented 6 years ago

Modifying one of the import statements solved the glitch.

import 'package:mdl/mdl.dart' as dmdl;

Naturally, the Component class which exists in both angular_components and mdl was conflicting.