angulardart / angular_components

The official Material Design components for AngularDart. Used at Google in production apps.

Home Page:https://pub.dev/packages/angular_components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build error with 0.14.0-alpha+1, when using MaterialStepper (StepDirective)

jbaxe2 opened this issue · comments

Hello,
I'm not sure if this is an issue for this package, or a different package (possibly angular or build_web_compiler?). I am using Dart SDK 2.5.0. Compiling with Dart2Js and DDC results in the same error.

I have an app that makes use of the MaterialStepper. It works perfectly fine with 0.13.0+1. However, I attempted to test out 0.14.0-alpha+1. Attempting to build my project with the newer version results in an error with the template built for the MaterialStepper. Here is the error I am receiving:

Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
this._StepDirective_5_9.canContinue = 'false';
^
Error: Compilation failed.

The complication works in the 'current' version (0.13.0+1). With the newer version, somewhere along the way in building the template, it appears to be converting the StepDirective's canContinue field from a bool to a String, for which a later step in the build is expecting the bool.

Any ideas?

Thanks,
Joe

I figured this out. In previous versions (0.13.0+1 and prior), you could have the following:

<template step canContinue="false" name="some name here"></template>

Obviously there would be things in the template. However, with 0.14.0-alpha+1, this has to change to:

<template step [canContinue]="false" name="some name here"></template>

The 'canContinue' field now requires surrounding square brackets in order for the build to work properly. As long as it works, I'm happy, though I'm not sure what changed for this requirement. I will close this issue.