https://github.com/mgechev/angular-ivy-demo
Demo repository showing how ivy allows significant API simplification.
https://github.com/mgechev/angular-ivy-demo
angular angular-ivy demo
Last synced: about 1 month ago
JSON representation
Demo repository showing how ivy allows significant API simplification.
- Host: GitHub
- URL: https://github.com/mgechev/angular-ivy-demo
- Owner: mgechev
- Created: 2018-12-03T01:25:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-09T21:20:56.000Z (over 6 years ago)
- Last Synced: 2025-04-30T10:50:05.802Z (about 1 month ago)
- Topics: angular, angular-ivy, demo
- Language: TypeScript
- Homepage:
- Size: 25.7 MB
- Stars: 53
- Watchers: 6
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Angular Ivy Demo
This repository demonstrates simplified API for using Angular enabled by ivy.
**Disclaimer**: the APIs below are highly experimental and likely to change. The produced bundle by parcel is not tree-shaked, which means that it'll be significant bigger than what Angular CLI will produce once Ivy is officially released.
## Overview
The entire application is within `index.html` and `index.ts`. The `index.ts` file contains two components and a pipe. There are two important points to notice:
- **There are no `@NgModule`s**
- **There are no zones**
- We don't use rxjs explicitlyThis already reduces the learning curve dramatically by cutting three of the most misunderstood concepts in Angular. **Keep in mind that Ivy does not deprecate NgModules and zones, they'll keep function the way they do today. The only difference is that with the new rendering they become optional**.
## Usage
To try the demo:
```
git clone [email protected]:mgechev/angular-ivy-demo
cd angular-ivy-demo && npm i
npm start
```Now open http://localhost:1234.
Try to create a "Hello, World!" application by:
* Create a file called `hello-world.html` with the following content:
```html
```
* Create a file called `hello-world.ts` with the following content:
```typescript
import {Component, ɵrenderComponent as renderComponent} from '@angular/core';
import '@angular/compiler';@Component({
selector: 'app',
template: 'Hello, World!'
})
class AppComponent {}renderComponent(AppComponent);
```* Run the following command:
```
./node_modules/.bin/parcel hello-world.html
```## License
MIT