How do we work with Angular.js

17
HOW DO WE WORK WITH ANGULAR.JS

Transcript of How do we work with Angular.js

HOW DO WE WORK

WITH ANGULAR.JS

Anastasiya RybikSoftware Engineer,

EPAM Systems

WHAT DID WE HAVE?

1 HTML file

~ 1300 lines of code

1 CSS file

~ 1500 lines of code

10 JavaScript files

~ 1000 - 2000 lines of code each

TECHNOLOGY STACK

WHY ANGULAR?

• Two-way data binding

• Modularity

• Templates

• Dependency Injection

• Simple Testing

• Supporting by Google (Community)

OR

ONE COMPONENT – TWO VIEWS

Change Dealership Directive

Dealership Service

Change Dealership Directive

attr

OR

COMPONENT STRUCTURE

Bundle.json

{

"id": "edm.creative.heroCarousel",

"name": "Hero Carousel",

"dependencies": [

"core.interlock.fulcrumConfig",

"ngResource",

...

],

...

}

COMPILE

JS CSS HTML

JS CSS HTML

JS CSS HTML

JS CSS

SO WHAT?

• Simple page building;

• Components reusability;

• Easy to support

• Code confidence;

THANK YOU!

HAVE QUESTIONS?