18
LAZY ANGULAR TI&M 7. March 2016 Mato Ilic Consulting. Design. Agile Projects. Products. Innovation Hosting.

LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

LAZY ANGULARTI&M

7. March 2016

Mato IlicConsulting. Design. Agile Projects. Products. Innovation Hosting.

Page 2: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

OBJECTIVESUnified project structure.Scalable architecture.Reasonableperformance.

Page 3: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

WHAT'S INSIDE

Page 4: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

FUTURE STATES

Page 5: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

FUTURE STATES

Click reports link

Yes

Stateloaded?

No

Show reports

Load reports stateLook up in Futures

No

Statefound?

Yes

Throw error

Page 6: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

PROJECT STRUCTURE

Page 7: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

GENERATORSgithub.com/matoilic/generator-angular-lazy (https://github.com/matoilic/generator-angular-lazy)

Page 8: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

APPLICATION COMPONENT

 $: yo angular-lazy 

Generates

the project structure and sets up all tools.the application component.a first state.

Page 9: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

STATE COMPONENT

 $: yo angular-lazy:state parent.child [--prefix=] 

Generates

a new UI Router state with template, controller etc.a new entry in states.json in the application component.

Page 10: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

UI COMPONENT

 $: yo angular-lazy:component name [--prefix=] 

Generates

A reusable UI component based on Angular's component provider.

Page 11: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

DIRECTIVE

 $: yo angular-lazy:directive name [--prefix=] 

Generates

A directive intended to be used as attribute.

Page 12: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

ANGULAR LAZYgithub.com/matoilic/angular-lazy (https://github.com/matoilic/angular-lazy)

Page 13: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

FUTURE STATE FACTORY

Future States of type "load" will be passed to this factory. It is responsible for loadingand initializing them properly.

Page 14: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

COMPONENT LOADER SERVICE

Enables us to manually load components at runtime. Useful if certain applicationparts are only needed when the user performs a certain action or certain criteria aremet.

Page 15: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

SYSTEM SERVICE

Wrapper around the import functionality of SystemJS. Gives us the possibility tomock import calls within tests.

Page 16: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

ANGULAR LAZY BUNDLERgithub.com/matoilic/angular-lazy-bundler (https://github.com/matoilic/angular-lazy-bundler)

Page 17: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

PURPOSE

Bundles each component separately into one file.Optimizes loading process for 3rd-party packages.Can bundle multiple components and 3rd-party packages into one file.

Page 18: LAZY ANGULAR · 3/7/2016  · STATE COMPONENT $: yo angular-lazy:state parent.child [--prefix=] Generates a new UI Router state with template, controller etc. a new entry in states.json

THE END

?