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

Invalid Value Error #100

Closed
isangha1 opened this issue May 2, 2019 · 7 comments
Closed

Invalid Value Error #100

isangha1 opened this issue May 2, 2019 · 7 comments
Assignees
Labels
bug Something isn't working ready

Comments

@isangha1
Copy link

isangha1 commented May 2, 2019

Bug Report

- [x] bug report

OS and Version?

Windows 10

Versions

$ ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 7.3.8
Node: 10.15.3
OS: win32 x64
Angular: 7.2.13
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.12.4
@angular-devkit/build-angular      0.13.8
@angular-devkit/build-ng-packagr   0.13.8
@angular-devkit/build-optimizer    0.13.8
@angular-devkit/build-webpack      0.13.8
@angular-devkit/core               7.2.4
@angular-devkit/schematics         7.2.4
@angular/cdk                       7.3.7
@angular/cli                       7.3.8
@angular/material                  7.3.7
@angular/material-moment-adapter   7.3.7
@ngtools/json-schema               1.1.0
@ngtools/webpack                   7.3.8
@schematics/angular                7.3.8
@schematics/update                 0.13.8
ng-packagr                         4.7.1
rxjs                               6.3.3
typescript                         3.1.6
webpack                            4.29.0

Repro steps

Follow steps for installation found in docs.
Implement directive or component (Both result in the errors).

The log given by the failure

Errors:
image

Expanded Error Message 1:
image

Expanded Error Message 2:
image

Desired functionality

The directive and component both work despite the errors depicted above. Therefore, the console should not be displaying any errors.

@ghost
Copy link

ghost commented May 3, 2019

I also have

InvalidValueError: setTypes: not an Array

@AnthonyNahas AnthonyNahas added the bug Something isn't working label May 4, 2019
@AnthonyNahas AnthonyNahas self-assigned this May 4, 2019
@AnthonyNahas
Copy link
Member

AnthonyNahas commented May 4, 2019

@iqjotsangha @doom777 I can confirm that a bug has been detected when I add the lib to a an app created from scratch!

Bildschirmfoto 2019-05-04 um 11 55 54

I am working on it!

Maybe this issue is related to #95

@AnthonyNahas
Copy link
Member

fixed in v1.6.0

@ghost
Copy link

ghost commented May 5, 2019

Issue is back in v1.6.1

@AnthonyNahas AnthonyNahas reopened this May 5, 2019
@AnthonyNahas
Copy link
Member

can you please post a snippet of the directive usage ?

@ghost
Copy link

ghost commented May 5, 2019

<mat-form-field>
    <input matInput matGoogleMapsAutocomplete matValidateAddress [types]="'geocode'"  [country]="['us','ca']" placeholder="The location" 
            class="location" (onLocationSelected)="locationChanged($event)" data-lpignore="true">
</mat-form-field>

@AnthonyNahas
Copy link
Member

you are using the types in a wrong way... it's an array --> types?: string[]

that means, to fix it please replace [types]="'geocode'" with [types]="['geocode']"

result:

<mat-form-field> <input matInput matGoogleMapsAutocomplete matValidateAddress [types]="['geocode']" [country]="['us','ca']" placeholder="The location" class="location" (onLocationSelected)="locationChanged($event)" data-lpignore="true"> </mat-form-field>

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready
Projects
None yet
Development

No branches or pull requests

2 participants