GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — self.context.search is undefined · Issue #3 · angularjs-de/angular2-tutorial

self.context.search is undefined #3

New issue
Copy link
New issue
Copy link
Open
Open
self.context.search is undefined#3
Copy link

Description

@ilosuna
ilosuna
opened on Oct 6, 2016
Issue body actions

Error in angular2-tutorial/04-expressions/src/app/app.component.ts:

EXCEPTION: Error in ./AppComponent class AppComponent - inline template:5:8 caused by: self.context.search is undefined

{{search.toUpperCase() + "!"}} should now be {{ search + "!" | uppercase }}. Not sure about search.length.

EDIT:
There must be a question mark after search: {{ search?.length || 0 }}

Activity

  1. KillerCodeMonkey commented on Nov 6, 2016

    @KillerCodeMonkey
    KillerCodeMonkey
    on Nov 6, 2016
    Contributor
    More actions

    Do not know what you are trying, but we are initialising search as a string with a value, so this.search or {{search}} is defined in any case --> if you remove all chars in the input field the string is an empty string ... so no problems at all?

    Maybe you can show us your complete component and template?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.