Skip to content
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

UNSUPPORTED: Map literals are no longer supported in the template. #133

Open
reducedcarpet opened this issue Nov 13, 2019 · 9 comments
Open
Assignees

Comments

@reducedcarpet
Copy link

First off, I would like to apologise because I have no clue as to whether this issue to due to the version of AngularDart my GitLab CI is using. But I do get a lot of errors trying to build ng_bootstrap all of them to do with map literals:

[SEVERE]angular:angular on package:ng_bootstrap/components/progress/progress.dart: Template parse errors:
line 9, column 15 of asset:ng_bootstrap/lib/components/progress/progress.dart: ParseErrorLevel.FATAL: Parser Error: UNSUPPORTED: Map literals are no longer supported in the template.
Move code that constructs or maintains Map instances inside of your @Component-annotated Dart class, or prefer syntax such as [class.active]="isActive" over [ngClass]="{'active': isActive}". [{$implicit: percentage, value: value, max: max}] in null

9 │ [ngTemplateOutletContext]="{$implicit: percentage, value: value, max: max}">
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is pretty much the same as the 30 ish other errors that appear after it.

I don't get this when I build it locally, and it doesn't effect manually deploying the code. But it does break the CI pipeline.

So what I'm asking is, is this a known issue with some version of dart or angulardart? Do I have extreme linting on somehow? Do I need to upgrade / downgrade some stuff? Was I only suppose to use this with Dart1?

@luisvt
Copy link
Contributor

luisvt commented Nov 13, 2019

what version are you using?

@luisvt luisvt self-assigned this Nov 13, 2019
@reducedcarpet
Copy link
Author

Apparently the CI pipeline is using dart 2.6 (an webdev 2.6.3 I think) at least, on my home machine I am using dart 2.4.1 and webdev version is 2.5.0, whereas PUB is 2.4.1. I downgraded the CI pipeline to 2.4 and it no longer complains about the map literals. I hope that helps.

@luisvt
Copy link
Contributor

luisvt commented Nov 13, 2019

sorry, what version of ng_bootstrap?

@reducedcarpet
Copy link
Author

Oh my Bad, the one on pub.dev: 1.1.1

@luisvt
Copy link
Contributor

luisvt commented Nov 14, 2019

try version 1.2.0-alpha.1

@reducedcarpet
Copy link
Author

Yeah I have now, and unfortunately it still had the same errors and refused to build. I tried it on Dart 2.5 as well and it was the same. (with the alpha version) so I still have to use dart 2.4

@luisvt
Copy link
Contributor

luisvt commented Nov 14, 2019

ok, let me check then

@konei
Copy link

konei commented Nov 20, 2019

I ran into this with angular 6.0.0-alpha.1
Knocking it down to alpha only fixed it:

dependencies:
angular: 6.0.0-alpha

I don't know the implications for future releases.

@zarisi
Copy link
Contributor

zarisi commented Feb 20, 2020

Fix for all the components made in #134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants