Coder Social home page Coder Social logo

angular-directives_class_15's Introduction

***As of 10//09, entire exercise completed minus the bonus and search-results component not yet used. All working functions are coming from navabr and randomColor Directive.
***As of 10/08, only completed up to step #3. Still a work in progress

Class15AngularDirectives

This project was generated with Angular CLI version 14.2.4.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.

Class Exercise Instructions

  1. Create a new Angular application.

  2. Generate two components using the CLI:

"navbar": a component that displays an input box and a search button. "search-results": a component that displays a list of your search history.

  1. The "NavbarComponent" should contain an input and a button.

The input should use two-way-binding to update a variable in your typescript file.

The button should have a click listener that runs a function that adds the currentSearchTerm to an array of searches.

  1. The "SearchResultsComponent" should loop through the searchHistory array and display all the searches you have previously inputed.

Display the text of the search on its own line

  1. Create a new Directive called "RandomBGColorDirective".

This directive should take in an elementRef and give it a random background color. Publish your project to GitHub!

Bonus: Listen for a hover event inside your "RandomBgColorDirective" that updates the background color of that element to a new color.

angular-directives_class_15's People

Contributors

klmueller avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.