angular-cn/public/index.jade

74 lines
4.1 KiB
Plaintext

include _includes/_util-fns
div(layout-gt-sm='row' style='margin: 0 -24px')
div(flex=33 style='padding:0 24px')
h3.text-headline Fast
p.text-body Angular computes updates based on changes to data, not DOM, for fast updates that scale to the largest data sets with minimal memory overhead.
div(flex=33 style='padding:0 24px')
h3.text-headline Mobile
p.text-body With Angular Universal for server-side rendering and Web Workers for smooth scrolling and transitions, Angular 2 solves the core challenges in mobile web performance.
div(flex=33 style='padding:0 24px')
h3.text-headline Flexible
p.text-body Supports several languages including plain JavaScript, TypeScript, and Dart. Also supports both object-style data structure with POJO data-binding and functional reactive style with unidirectional data flow and support for observables and immutable data structures.
br
div
h3.text-headline The Basics
p.text-body In Angular you display data by defining components. Data in your component classes is automatically available to display in your templates or control how they render as in the example below.
p.text-body While this example uses TypeScript, Angular works equally well with ES5, ES6 and Dart as well.
p(style='text-align:right')
md-button.md-primary(href='/resources/live-examples/homepage-hello-world/ts/plnkr.html' target='_blank')
span.icon-open-in-new
| Try in Plunker
+makeTabs(`
../docs/_fragments/homepage-hello-world/ts/app/hello_world.html,
../docs/_fragments/homepage-hello-world/ts/app/hello_world.ts,
../docs/_fragments/homepage-hello-world/ts/app/main.ts,
../docs/_fragments/homepage-hello-world/ts/index.1.html`,
null,
`app/hello_world.html,
app/hello_world.ts,
app/main.ts,
index.html`)
br
div
h3.text-headline Structuring Apps With Components
p.text-body Groups of coordinated components divide the responsibilities of our application. This ToDo list app has a separate component for the form, the list, and the core app logic. Where the previous example component referenced templates in separate files, this one shows using inline templates.
p.text-body Defining types as we do here in Todo.ts communicates our intention to other developers, helps us find bugs in our code, and lets IDEs do more work for us in refactoring, code navigation, and code completion.
p(style='text-align:right')
md-button.md-primary(href='/resources/live-examples/homepage-todo/ts/plnkr.html' target='_blank')
span.icon-open-in-new
| Try in Plunker
+makeTabs(`
../docs/_fragments/homepage-todo/ts/app/todo_app.ts,
../docs/_fragments/homepage-todo/ts/app/todo_form.ts,
../docs/_fragments/homepage-todo/ts/app/todo_list.ts,
../docs/_fragments/homepage-todo/ts/app/todo.ts,
../docs/_fragments/homepage-todo/ts/app/main.ts,
../docs/_fragments/homepage-todo/ts/index.1.html`,
null,
`app/todo_app.ts,
app/todo_form.ts,
app/todo_list.ts,
app/todo.ts,
app/main.ts,
index.html`)
br
div
h3.text-headline Advanced Component Communication
p.text-body This demo shows an efficient implementation of tabs/panes. Each pane is only instantiated while it is visible. Panes which are not visible are released and do not have associated memory, DOM and change detection cost.
p.text-body The demo also showcases dependency injection and the ability of one component to query for other components. Such queries automatically update even as detail panes are added. This allows the tabs component to work with <code>ngFor</code> without any special knowledge of it.
p(style='text-align:right')
md-button.md-primary(href='/resources/live-examples/homepage-tabs/ts/plnkr.html' target='_blank')
span.icon-open-in-new
| Try in Plunker
+makeTabs(`
../docs/_fragments/homepage-tabs/ts/app/di_demo.ts,
../docs/_fragments/homepage-tabs/ts/app/ui_tabs.ts,
../docs/_fragments/homepage-tabs/ts/app/main.ts,
../docs/_fragments/homepage-tabs/ts/index.1.html`,
null,
`app/di_demo.ts,
app/ui_tabs.ts,
app/main.ts,
index.html`)