SlideShare a Scribd company logo
Want to Use Ext JS Components with
Angular 2?
Here’s How to Increase the Power
of Your Apps!
Marc Gusmano
Senior Sales Engineer
marc.gusmano@sencha.com
Have you ever wished you could use Sencha’s powerful Ext JS components in your
Angular 2 apps? Now you can. Learn about the new bridge we’ve created that
enables you to use the Ext JS grid, treegrid, pivot grid, calendar, charts, and other
components in your Angular 2 based apps.
We’ve integrated the frameworks, so Ext JS components recognize the Angular 2
directives and appropriately respond to events. If you’re an Angular 2 user, there is
no reason why you can’t use it to assemble the basic building blocks of an app and
then add the powerful Ext JS components to complete your data-centric, cross-
platform applications.
Come to this session to learn how to build a data-intensive, cross-platform app with
Ext JS 6.2 and Angular 2.
2
What Will We Be Doing?
So What is the Angular 2 Bridge for Ext JS?
• Enables the use of Ext JS Components, Layouts, Ext JS Classes within Angular 2
• Currently in Preview (no code available yet)
• Still need tooling (Sencha Cmd support)
• Works with Modern Toolkit
• Uses Ext JS Theme (no tooling currently)
• We need your feedback on this! marc.gusmano@sencha.com
3
Starter Options for an Angular 2 Application
• Angular.io – getting started https://angular.io/docs/ts/latest/quickstart.html
• Angular-cli https://cli.angular.io/
• Reddit – helpful GitHub repos https://www.reddit.com/r/Angular2/
4
Demo –
Angular-cli
import { Component } from '@angular/core';
@Component({
selector: 'simple',
template: `
<h1>{{title}}</h1>
<button
class="theButton"
[disabled]="isDisabled"
(click)="onClick($event)">
{{title}}
</button>
`,
styles: [`
.theButton {
font-size: 32px;
}
`]
})
export class SimpleComponent {
title = 'app works!';
isDisabled = false;
private onClick(event) {
console.log(event)
this.title = 'I was clicked and disabled';
this.isDisabled = true;
}
}
An Angular2 Component
using TypeScript
(Angular 2 – 101)
• import
• @component
- selector, template, styles
- templateUrl, stylesUrl
• export class
• [name] is syntax for a property
• (name) is syntax for an event
• {{name}} is binding syntax
Demo –
a simple Angular 2 component
if (o.alias != undefined &&
o.alias.substring(0, 6) == 'widget' &&
o.alias.substring(7).indexOf('.') == -1 &&
o.alias.indexOf('actionsheet') == -1 &&
o.alias.indexOf('audio') == -1 &&
o.alias.indexOf('axis') == -1 &&
o.alias.indexOf('carouselindicator') == -1 &&
o.alias.substring(7).indexOf('item') == -1 &&
o.alias.substring(7).indexOf('cell') == -1 &&
o.alias.substring(7).indexOf('column') == -1 &&
o.alias.substring(7).indexOf('row') == -1 &&
o.alias.substring(7).indexOf('sparkline') == -1 &&
o.alias.substring(7).indexOf('pivotconfig') == -1 &&
o.alias.indexOf(',') == -1
)
8
All ‘primary’ Visual Components, except for…
import { Component } from '@angular/core';
@Component({
selector: '',
styles: [``],
template: `
<x-grid fitToParent=true
[config]="gridConfig">
</x-grid>
`
})
export class BridgeHomeComponent {
gridConfig= {
title: 'Bridge Home',
columns: [
{text:'Name', width:100, dataIndex:'name'},
{text:'Email Address', flex:1, dataIndex:'email'},
{text:'Phone Number', width:150, dataIndex:'phone'}
],
store: {
fields: ['name', 'email', 'phone'],
data: [
{name:'Lisa', email:'lisa@simpsons.com', phone:'555-111-1224'},
{name:'Bart', email:'bart@simpsons.com', phone:'555-222-1234'},
{name:'Homer', email:'homer@simpsons.com', phone:'555-222-1244'},
{name:'Marge', email:'marge@simpsons.com', phone:'555-222-1254'}
]
}
};
}
An Angular2 Component
that uses the Ext JS Grid
• x- is the prefix for an Ext JS
component
• Following the x- is the xtype (x-grid)
• General property called [config]
- All components have this property
• Also all have fitToParent property
• Also all have (ready) event
import { Component } from '@angular/core';
@Component({
selector: '',
styles: [``],
template: `
<x-grid fitToParent=true
[columns]="gridcolumns"
[store]="gridstore"
(select)="onGridSelect($event)"
(activate)="onGridActivate($event)"
(ready)="gridReady($event)">
</x-grid>
`
})
export class BridgeHomeComponent {
gridcolumns = [
{text:'Name', width:100, dataIndex:'name'},
{text:'Email Address', flex:1, dataIndex:'email'},
{text:'Phone Number', width:150, dataIndex:'phone'}
];
gridstore = {
fields: ['name', 'email', 'phone'],
data: [
{name:'Lisa', email:'lisa@simpsons.com', phone:'555-111-1224'},
{name:'Bart', email:'bart@simpsons.com', phone:'555-222-1234'},
{name:'Homer', email:'homer@simpsons.com', phone:'555-222-1244'},
{name:'Marge', email:'marge@simpsons.com', phone:'555-222-1254'}
]
};
private onGridSelect({record}) {alert(record.data.name);}
private onGridActivate(event) {console.log(event);}
private onGridReady(theGrid) {console.log(theGrid.x);}
}
An Angular2 Component
that uses the Ext JS Grid
• All components have an Angular 2
property for each Ext JS config
- For example: [columns]
• All events are also available
- For example: (select)
• (ready) event is used to extract the
underlying Ext JS component
- Available as the ‘x’ property of the passed
parameter
Demo –
Ext JS Grid in Angular 2
@Component({
selector: '',
styles: [``],
template: `
<x-container fitToParent=true [layout]="'vbox'">
<x-panel [margin]="'20 20 20 20'" [title]="header">
<x-selectfield
[config]="selectfieldConfig"
[options]='selectfieldOptions'
(change)='onSelectfieldSelect($event)'>
</x-selectfield>
</x-panel>
<x-pivotgrid
[flex]="'1'"
[title] ='pivotTitle'
[config]='pivotgridConfig'
(ready)="readyPivotGrid($event)"
(pivotdone)="onPivotgridPivotDone($event)">
</x-pivotgrid>
<x-cartesian
[flex]="'1'”
[config]='cartesianConfig'
(ready)="readyCartesian($event)">
</x-cartesian>
</x-container>
`
})
Using the Ext JS Layout System
• vbox, hbox, flex, etc.
• Containment (the ‘items’ collection)
import {xclass} from 'angular2-extjs';
export class SalesStore extends xclass {
constructor (createConfig: any) {
let className: any = 'SalesStore';
let extend: any = 'Ext.data.ArrayStore';
let defineConfig: any = {
alias: 'store.sales',
autoLoad: true,
proxy: {
type: 'ajax',
url: 'assets/sales.json',
reader: {
type: 'json',
rootProperty: 'rows'
}
},
filters: [
function(item) {
return item.get('year') >= 2012;
}
],
fields: [
{name: 'orderid', type: 'int'},
{name: 'salesperson', type: 'string'},
{name: 'country', type: 'string'},
{name: 'orderdate', type: 'date', dateFormat: 'd/m/Y'},
{name: 'amount', type: 'int'}
]
};
super(className, extend, defineConfig, createConfig);
return;
}
}
Creating non-visual components
(like stores and models)
• Import ‘xclass’
• Extend ‘xclass’
• Populate ‘className’
• Populate ‘extend’
• Populate 'defineConfig’
• Call the ‘xclass’ base class
Demo –
An Angular 2 app with Ext
JS
• Angular-cli starter
• Angular-cli application with Ext JS
15
Development and Production payloads
Development and Production payloads
Q & A
Question & Answer Session
SenchaCon 2016: Want to Use Ext JS Components with Angular 2? Here’s How to Increase the Power of Your Apps! - Marc Gusmano

More Related Content

PPTX
Ext JS Architecture Best Practices - Mitchell Simeons
PDF
Workshop 8: Templating: Handlebars, DustJS
PPTX
Jquery Complete Presentation along with Javascript Basics
PPTX
SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling
PPTX
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
PDF
Angular Directives from Scratch
PDF
jQuery in 15 minutes
PPTX
Academy PRO: React native - navigation
Ext JS Architecture Best Practices - Mitchell Simeons
Workshop 8: Templating: Handlebars, DustJS
Jquery Complete Presentation along with Javascript Basics
SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
Angular Directives from Scratch
jQuery in 15 minutes
Academy PRO: React native - navigation

What's hot (20)

PDF
Difference between java script and jquery
PDF
Sane Async Patterns
PDF
Workshop 6: Designer tools
PPTX
AngularJS Directives
PPT
JQuery introduction
PPTX
jQuery PPT
PPTX
jQuery from the very beginning
ODP
Introduction to jQuery
KEY
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
PDF
Learning jQuery in 30 minutes
PDF
Zepto.js, a jQuery-compatible mobile JavaScript framework in 2K
PDF
Workshop 18: CSS Animations & cool effects
PPTX
JavaScript and jQuery Basics
ODP
Drupal Best Practices
PPTX
Academy PRO: React native - building first scenes
ODP
Session 2- day 3
PPTX
Getting the Most Out of jQuery Widgets
PPT
A Short Introduction To jQuery
PDF
Prototype & jQuery
Difference between java script and jquery
Sane Async Patterns
Workshop 6: Designer tools
AngularJS Directives
JQuery introduction
jQuery PPT
jQuery from the very beginning
Introduction to jQuery
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Learning jQuery in 30 minutes
Zepto.js, a jQuery-compatible mobile JavaScript framework in 2K
Workshop 18: CSS Animations & cool effects
JavaScript and jQuery Basics
Drupal Best Practices
Academy PRO: React native - building first scenes
Session 2- day 3
Getting the Most Out of jQuery Widgets
A Short Introduction To jQuery
Prototype & jQuery
Ad

Similar to SenchaCon 2016: Want to Use Ext JS Components with Angular 2? Here’s How to Increase the Power of Your Apps! - Marc Gusmano (20)

PDF
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
PDF
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
PDF
Architecture for scalable Angular applications (with introduction and extende...
PDF
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
PDF
Aprimorando sua Aplicação com Ext JS 4 - BrazilJS
PDF
Capstone ms2
PDF
Web components with Angular
PDF
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
PPTX
Ext Web Components - Dev Week 2019
PDF
RIA - Entwicklung mit Ext JS
PPTX
Building a TV show with Angular, Bootstrap, and Web Services
PDF
Angular 2 - The Next Framework
PDF
An introduction to Angular2
PDF
Hidden Docs in Angular
PPT
Ember.js Tokyo event 2014/09/22 (English)
PPTX
Magic of web components
PDF
Exploring Angular 2 - Episode 1
PPTX
Peggy angular 2 in meteor
PDF
Angular2 Development for Java developers
PDF
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Architecture for scalable Angular applications (with introduction and extende...
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Aprimorando sua Aplicação com Ext JS 4 - BrazilJS
Capstone ms2
Web components with Angular
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
Ext Web Components - Dev Week 2019
RIA - Entwicklung mit Ext JS
Building a TV show with Angular, Bootstrap, and Web Services
Angular 2 - The Next Framework
An introduction to Angular2
Hidden Docs in Angular
Ember.js Tokyo event 2014/09/22 (English)
Magic of web components
Exploring Angular 2 - Episode 1
Peggy angular 2 in meteor
Angular2 Development for Java developers
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
Ad

More from Sencha (20)

PDF
Breathe New Life into Your Existing JavaScript Applications with Web Components
PDF
Ext JS 6.6 Highlights
PDF
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
PDF
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
PDF
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
PDF
Sencha Roadshow 2017: What's New in Sencha Test
PDF
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
PDF
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
PDF
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
PDF
Sencha Roadshow 2017: Mobile First or Desktop First
PDF
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
PDF
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
PDF
Learn Key Insights from The State of Web Application Testing Research Report
PPTX
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
PPT
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
PPT
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
PPT
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
PPTX
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
PPTX
Building Ext JS Using HATEOAS - Jeff Stano
PPTX
SenchaCon 2016: Improve Workflow Driven Applications with Ext JS Draw Package...
Breathe New Life into Your Existing JavaScript Applications with Web Components
Ext JS 6.6 Highlights
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
Learn Key Insights from The State of Web Application Testing Research Report
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
Building Ext JS Using HATEOAS - Jeff Stano
SenchaCon 2016: Improve Workflow Driven Applications with Ext JS Draw Package...

Recently uploaded (20)

PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
cuic standard and advanced reporting.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Encapsulation theory and applications.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
20250228 LYD VKU AI Blended-Learning.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Reach Out and Touch Someone: Haptics and Empathic Computing
Advanced methodologies resolving dimensionality complications for autism neur...
cuic standard and advanced reporting.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
MIND Revenue Release Quarter 2 2025 Press Release
Chapter 3 Spatial Domain Image Processing.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Approach and Philosophy of On baking technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Per capita expenditure prediction using model stacking based on satellite ima...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Encapsulation_ Review paper, used for researhc scholars
Encapsulation theory and applications.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation

SenchaCon 2016: Want to Use Ext JS Components with Angular 2? Here’s How to Increase the Power of Your Apps! - Marc Gusmano

  • 1. Want to Use Ext JS Components with Angular 2? Here’s How to Increase the Power of Your Apps! Marc Gusmano Senior Sales Engineer marc.gusmano@sencha.com
  • 2. Have you ever wished you could use Sencha’s powerful Ext JS components in your Angular 2 apps? Now you can. Learn about the new bridge we’ve created that enables you to use the Ext JS grid, treegrid, pivot grid, calendar, charts, and other components in your Angular 2 based apps. We’ve integrated the frameworks, so Ext JS components recognize the Angular 2 directives and appropriately respond to events. If you’re an Angular 2 user, there is no reason why you can’t use it to assemble the basic building blocks of an app and then add the powerful Ext JS components to complete your data-centric, cross- platform applications. Come to this session to learn how to build a data-intensive, cross-platform app with Ext JS 6.2 and Angular 2. 2 What Will We Be Doing?
  • 3. So What is the Angular 2 Bridge for Ext JS? • Enables the use of Ext JS Components, Layouts, Ext JS Classes within Angular 2 • Currently in Preview (no code available yet) • Still need tooling (Sencha Cmd support) • Works with Modern Toolkit • Uses Ext JS Theme (no tooling currently) • We need your feedback on this! marc.gusmano@sencha.com 3
  • 4. Starter Options for an Angular 2 Application • Angular.io – getting started https://angular.io/docs/ts/latest/quickstart.html • Angular-cli https://cli.angular.io/ • Reddit – helpful GitHub repos https://www.reddit.com/r/Angular2/ 4
  • 6. import { Component } from '@angular/core'; @Component({ selector: 'simple', template: ` <h1>{{title}}</h1> <button class="theButton" [disabled]="isDisabled" (click)="onClick($event)"> {{title}} </button> `, styles: [` .theButton { font-size: 32px; } `] }) export class SimpleComponent { title = 'app works!'; isDisabled = false; private onClick(event) { console.log(event) this.title = 'I was clicked and disabled'; this.isDisabled = true; } } An Angular2 Component using TypeScript (Angular 2 – 101) • import • @component - selector, template, styles - templateUrl, stylesUrl • export class • [name] is syntax for a property • (name) is syntax for an event • {{name}} is binding syntax
  • 7. Demo – a simple Angular 2 component
  • 8. if (o.alias != undefined && o.alias.substring(0, 6) == 'widget' && o.alias.substring(7).indexOf('.') == -1 && o.alias.indexOf('actionsheet') == -1 && o.alias.indexOf('audio') == -1 && o.alias.indexOf('axis') == -1 && o.alias.indexOf('carouselindicator') == -1 && o.alias.substring(7).indexOf('item') == -1 && o.alias.substring(7).indexOf('cell') == -1 && o.alias.substring(7).indexOf('column') == -1 && o.alias.substring(7).indexOf('row') == -1 && o.alias.substring(7).indexOf('sparkline') == -1 && o.alias.substring(7).indexOf('pivotconfig') == -1 && o.alias.indexOf(',') == -1 ) 8 All ‘primary’ Visual Components, except for…
  • 9. import { Component } from '@angular/core'; @Component({ selector: '', styles: [``], template: ` <x-grid fitToParent=true [config]="gridConfig"> </x-grid> ` }) export class BridgeHomeComponent { gridConfig= { title: 'Bridge Home', columns: [ {text:'Name', width:100, dataIndex:'name'}, {text:'Email Address', flex:1, dataIndex:'email'}, {text:'Phone Number', width:150, dataIndex:'phone'} ], store: { fields: ['name', 'email', 'phone'], data: [ {name:'Lisa', email:'lisa@simpsons.com', phone:'555-111-1224'}, {name:'Bart', email:'bart@simpsons.com', phone:'555-222-1234'}, {name:'Homer', email:'homer@simpsons.com', phone:'555-222-1244'}, {name:'Marge', email:'marge@simpsons.com', phone:'555-222-1254'} ] } }; } An Angular2 Component that uses the Ext JS Grid • x- is the prefix for an Ext JS component • Following the x- is the xtype (x-grid) • General property called [config] - All components have this property • Also all have fitToParent property • Also all have (ready) event
  • 10. import { Component } from '@angular/core'; @Component({ selector: '', styles: [``], template: ` <x-grid fitToParent=true [columns]="gridcolumns" [store]="gridstore" (select)="onGridSelect($event)" (activate)="onGridActivate($event)" (ready)="gridReady($event)"> </x-grid> ` }) export class BridgeHomeComponent { gridcolumns = [ {text:'Name', width:100, dataIndex:'name'}, {text:'Email Address', flex:1, dataIndex:'email'}, {text:'Phone Number', width:150, dataIndex:'phone'} ]; gridstore = { fields: ['name', 'email', 'phone'], data: [ {name:'Lisa', email:'lisa@simpsons.com', phone:'555-111-1224'}, {name:'Bart', email:'bart@simpsons.com', phone:'555-222-1234'}, {name:'Homer', email:'homer@simpsons.com', phone:'555-222-1244'}, {name:'Marge', email:'marge@simpsons.com', phone:'555-222-1254'} ] }; private onGridSelect({record}) {alert(record.data.name);} private onGridActivate(event) {console.log(event);} private onGridReady(theGrid) {console.log(theGrid.x);} } An Angular2 Component that uses the Ext JS Grid • All components have an Angular 2 property for each Ext JS config - For example: [columns] • All events are also available - For example: (select) • (ready) event is used to extract the underlying Ext JS component - Available as the ‘x’ property of the passed parameter
  • 11. Demo – Ext JS Grid in Angular 2
  • 12. @Component({ selector: '', styles: [``], template: ` <x-container fitToParent=true [layout]="'vbox'"> <x-panel [margin]="'20 20 20 20'" [title]="header"> <x-selectfield [config]="selectfieldConfig" [options]='selectfieldOptions' (change)='onSelectfieldSelect($event)'> </x-selectfield> </x-panel> <x-pivotgrid [flex]="'1'" [title] ='pivotTitle' [config]='pivotgridConfig' (ready)="readyPivotGrid($event)" (pivotdone)="onPivotgridPivotDone($event)"> </x-pivotgrid> <x-cartesian [flex]="'1'” [config]='cartesianConfig' (ready)="readyCartesian($event)"> </x-cartesian> </x-container> ` }) Using the Ext JS Layout System • vbox, hbox, flex, etc. • Containment (the ‘items’ collection)
  • 13. import {xclass} from 'angular2-extjs'; export class SalesStore extends xclass { constructor (createConfig: any) { let className: any = 'SalesStore'; let extend: any = 'Ext.data.ArrayStore'; let defineConfig: any = { alias: 'store.sales', autoLoad: true, proxy: { type: 'ajax', url: 'assets/sales.json', reader: { type: 'json', rootProperty: 'rows' } }, filters: [ function(item) { return item.get('year') >= 2012; } ], fields: [ {name: 'orderid', type: 'int'}, {name: 'salesperson', type: 'string'}, {name: 'country', type: 'string'}, {name: 'orderdate', type: 'date', dateFormat: 'd/m/Y'}, {name: 'amount', type: 'int'} ] }; super(className, extend, defineConfig, createConfig); return; } } Creating non-visual components (like stores and models) • Import ‘xclass’ • Extend ‘xclass’ • Populate ‘className’ • Populate ‘extend’ • Populate 'defineConfig’ • Call the ‘xclass’ base class
  • 14. Demo – An Angular 2 app with Ext JS
  • 15. • Angular-cli starter • Angular-cli application with Ext JS 15 Development and Production payloads
  • 17. Q & A Question & Answer Session