GithubHelp home page GithubHelp logo

mmustra / angular-on-push-strategy Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 760 KB

Visual examples representing Angular change detection with OnPush strategy

Home Page: https://mmustra.github.io/angular-on-push-strategy

License: MIT License

HTML 13.07% TypeScript 82.60% CSS 4.13% JavaScript 0.20%
angular content-projection rxjs directive-composition standalone-components change-detection dynamic-components onpush-strategy

angular-on-push-strategy's Introduction

Angular OnPush Strategy

Visual examples representing Angular change detection with OnPush strategy.
🔗 live app

           

Table of Contents

About

It is a playground for improving understanding of change detection and the OnPush strategy. In the future this project may be extended with additional examples or strategies.

Usage

After you run application:

  1. Open Console from DevTools
  2. Click on app tabs, tryout examples

Example will show animation and logs. You can reload the example and change the speed of animation. Every button click in example will reset the animation/logs.

Features

  • Standalone components
  • Dynamic components
  • Portal components
  • Content projection
  • Directive composition
  • Dependency providers
  • Resolution modifiers

Technologies

  • Angular 16
  • Primeng
  • RxJS
  • Tailwind
  • ngneat/overview
  • Lodash

Development

This project was generated with Angular CLI version 16.2.1.

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

IDE

Visual Studio Code is recommended. Prettier is used as formatter for the project.

Code style

Be sure to follow current folder structure and code style in the project. Use Typescript to create better code environment with your contributions. Before adding new packages to project be sure to first check package.json for possible duplicates.

For generating new angular components use ng generate.
Example: ng generate component component-name

You can also use ng generate directive|pipe|service|class|guard|interface|enum|module. To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

Scripts

Serve

Run ng serve to serve the project. Use the --prod flag for a production build.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

License

The MIT License (MIT)
Copyright (c) 2023, Marin Muštra

angular-on-push-strategy's People

Contributors

mmustra avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

hamidev

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.