SlideShare a Scribd company logo
Svet JavaScriptu




   Ladislav Gažo

  gazo@seges.sk
  @ladislavGazo
JavaScript.... whaaat?




2 | Internal use only
3 | Internal use only
JavaScript

      • JavaScript (JS) is an open            • JavaScript is:
               source client-side scripting      – Prototype-based
               language commonly
                                                 – Dynamic
               implemented as part of a
                                                 – Weakly-typed
               web browser in order to
                                                 – Has First-class functions
               create enhanced user
                                                 – Influenced by C &
               interfaces and dynamic
               websites.                             Java,...



4 | Internal use only
Basics

      • <script> tag
      • var a = 7;
      • if, then, else
      • for, while
      • namespaces
      • functions
      • web server – Apache, nginx



5 | Internal use only
JavaScript world

      • BackboneJS      • jQuery
      • underscore      • YUI
      • EmberJS         • node.js
      • CanJS           • TypeScript
      • MeteorJS        • Closure
      • EsteJS




6 | Internal use only
Tools

      • Chrome Developer Tools
      • Firebugs
      • IE Developer Toolbar
      • Opera
      • Editor: vim, webstorm,
                sublime text, notepad,...




7 | Internal use only
A co to ten angulár umí?

      • Data binding
      • Controller
      • Plain JavaScript
      • Validation
      • Server communication
      • Directives
      • Injection
      • Testing

8 | Internal use only
<h2>BizMon</h2>
                        <div id="bizmonApp" ng-controller="BizmonCtrl">
                            <div class="navbar navbar-fixed-top">
                                <div class="navbar-inner">
                                    <div class="container">
                                        <a class="brand" href="#">Bizmon</a>
                                        <ul class="nav">
                                            <li ng-repeat="project in projects">
                                                <a ng-href="#/projects/
                        {{project.id}}">{{project.name}}</a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <div class="container-fluid">
                                <div class="row-fluid" ng-view></div>

                                <footer>
                                    <p>&copy; Seges 2012</p>
                                </footer>
                            </div>
                        </div>




9 | Internal use only
Curly brackets?




                           In HTML?


10 | Internal use only
function BizmonCtrl($scope, projectService) {
              $scope.projects = projectService.query();
           }
           BizmonCtrl.$inject = ["$scope", "projectService"];




11 | Internal use only
angular.module('bizmonApp.services', [ 'ngResource' ]).factory(
           'projectService', function($resource) {
           var service = $resource('rest/projects/:projectId', {}, {});
           return service;
       });




            mvn -o archetype:generate -DarchetypeGroupId=sk.seges.acris.archetype -DarchetypeArtifactId=acris-archetype-rest-server

             ( AcrIS - http://acris.googlecode.com )



12 | Internal use only
ng-click wohohooo




13 | Internal use only
<tr ng-repeat="issueState in prjScope.issueStates">
           <td ng-class="'operation-' + issueState.operation">
               <a ng-click="editIssue(issueState)">{{issueState.uuid}}</a>
           </td>
           <td>{{issueState.reason}}</td>
           <td>
               <span class="btn-group" ng-show="projectScopeViews[prjScope.id].edit">
                   <a class="btn btn-primary" ng-click="toggleOperation(issueState)">
                       <span ng-bind="issueState.operation"></span>
                   </a>
                   <a class="btn btn-danger" ng-click="deleteIssue(prjScope,
       issueState)">Delete</a>
               </span>
           </td>
       </tr>




14 | Internal use only
<input type="textarea" ng-model="activeIssueState.reason"
                        placeholder="optional reason why you are creating the issue"
                size="4"/>




15 | Internal use only
Neatness


16 | Internal use only
var inputNameDirective =         ['$interpolate',
                                             function($interpolate) {
                  return {
                      restrict: 'A',
                      scope: {
                          inputName: 'attribute',
                          ngModel: 'accessor'
                      },
                      require: ['ngModel','^?form'],
                      link: function (scope, element, attrs, ctrl) {
                          var ex = $interpolate(scope.inputName);
                          scope.nameTransformed = ex(scope.$parent);

                             var modelCtrl = ctrl[0];
                             modelCtrl.$name = scope.nameTransformed;

                             var formCtrl = ctrl[1] || nullFormCtrl;
                             formCtrl.$addControl(modelCtrl);
                         }
                 };
                }];


          angular.module('bizmonApp.directives',[]).directive('inputName',
          inputNameDirective);



17 | Internal use only
18 | Internal use only
WORK with US

                                          WebElement
    Java Group                            Rubyslava

                         Thank you for your patience

                              gazo@seges.sk
                              @ladislavGazo
19 | Internal use only
Links

          BizMon project - https://github.com/lgazo/bizmon
      • AcrIS – http://acris.googlecode.com
      • AngularJS – http://angularjs.org
      • GDG
             – http://www.meetup.com/GTUG-Slovakia/
             – https://www.facebook.com/groups/149659868513109/
             – https://plus.google.com/115200570829527654069
      • Java Group -
               https://www.facebook.com/groups/359487710807375/
20 | Internal use only

More Related Content

PDF
AngularJS first steps
PDF
Client-side MVC with Backbone.js
PPTX
Javascript first-class citizenery
PDF
Introduction to javascript templating using handlebars.js
PPSX
RequireJS
PDF
jQuery (DrupalCamp Toronto)
PDF
jQuery (BostonPHP)
PPTX
Up & Running with Polymer
AngularJS first steps
Client-side MVC with Backbone.js
Javascript first-class citizenery
Introduction to javascript templating using handlebars.js
RequireJS
jQuery (DrupalCamp Toronto)
jQuery (BostonPHP)
Up & Running with Polymer

What's hot (20)

PDF
PHP MVC Tutorial
PDF
Workshop 12: AngularJS Parte I
PDF
The Dojo Build System
PDF
JavaScript Libraries (@Media)
PDF
SproutCore and the Future of Web Apps
PDF
jQuery (MeshU)
PDF
JavaScript Libraries (Kings of Code)
PDF
Netvibes UWA workshop at ParisWeb 2007
PDF
The MEAN stack
PDF
建立前端開發團隊 - 2011 中華電信訓練所版
PDF
JavaScript the Smart Way - Getting Started with jQuery
PDF
Modern Web Application Development Workflow - EclipseCon Europe 2014
PPTX
Vue business first
PDF
Web2.0 with jQuery in English
PDF
Learning django step 1
PPTX
Checkout Customizations in Magento 2 - MageTitansMCR 2017
PPTX
Polymer / WebComponents
PDF
阅读类 Web 应用前端技术探索
PPTX
AngularJS for Java Developers
PPTX
Knockout.js
PHP MVC Tutorial
Workshop 12: AngularJS Parte I
The Dojo Build System
JavaScript Libraries (@Media)
SproutCore and the Future of Web Apps
jQuery (MeshU)
JavaScript Libraries (Kings of Code)
Netvibes UWA workshop at ParisWeb 2007
The MEAN stack
建立前端開發團隊 - 2011 中華電信訓練所版
JavaScript the Smart Way - Getting Started with jQuery
Modern Web Application Development Workflow - EclipseCon Europe 2014
Vue business first
Web2.0 with jQuery in English
Learning django step 1
Checkout Customizations in Magento 2 - MageTitansMCR 2017
Polymer / WebComponents
阅读类 Web 应用前端技术探索
AngularJS for Java Developers
Knockout.js
Ad

Similar to ITexperience - AngularJS (20)

PDF
Introduction to AngularJS
KEY
Javascript Frameworks for Well Architected, Immersive Web Apps
PDF
AngularJS for Web and Mobile
PDF
Angular js gtg-27feb2013
PPTX
AngularJS 1.x - your first application (problems and solutions)
PPTX
Building single page applications
PDF
[Ebooks PDF] download AngularJS 1st Edition Brad Green full chapters
PDF
Client-side MVC with Backbone.js (reloaded)
KEY
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
PDF
Architecting non-trivial browser applications (Jazoon 2012)
PDF
Resources and relationships at front-end
PPTX
Angular js 1.0-fundamentals
PDF
frontend college edulink kenia
PDF
AngularJS: Overview & Key Features
PPTX
Practical AngularJS
PDF
Building businesspost.ie using Node.js
PDF
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdf
PDF
Quick start with AngularJS
PDF
Introduction to angular js july 6th 2014
PDF
A practical look at your first laravel angular js app
Introduction to AngularJS
Javascript Frameworks for Well Architected, Immersive Web Apps
AngularJS for Web and Mobile
Angular js gtg-27feb2013
AngularJS 1.x - your first application (problems and solutions)
Building single page applications
[Ebooks PDF] download AngularJS 1st Edition Brad Green full chapters
Client-side MVC with Backbone.js (reloaded)
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Architecting non-trivial browser applications (Jazoon 2012)
Resources and relationships at front-end
Angular js 1.0-fundamentals
frontend college edulink kenia
AngularJS: Overview & Key Features
Practical AngularJS
Building businesspost.ie using Node.js
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdf
Quick start with AngularJS
Introduction to angular js july 6th 2014
A practical look at your first laravel angular js app
Ad

More from Michal Maxian (16)

ODP
Brainstorming @ Impact hub
PPTX
StartupWeekend Brno #1 Friday Deck
PPTX
Ansible @ WebElement 2015
PDF
#SWmixer vol.1 summary
PPTX
StartupWeekend Tuzla Friday start
PPTX
StartupWeekend Tuzla pitching like a boss
PDF
ITexperience 2013
PDF
I texperience preview_phase1
PDF
Startup weekend@slovakia
PDF
StartupWeekend Zilina #1 - Friday
PPTX
Ako prezentovat aj pred investorom
PPTX
StartupWeekend Kosice 2012 Final pitches
PPTX
StartupWeekend Kosice - saturday
PPTX
StartupWeekend Kosice opening
PDF
StartupWeekend Bratislava invitation 2012
PPTX
StartupWeekend Bratislava
Brainstorming @ Impact hub
StartupWeekend Brno #1 Friday Deck
Ansible @ WebElement 2015
#SWmixer vol.1 summary
StartupWeekend Tuzla Friday start
StartupWeekend Tuzla pitching like a boss
ITexperience 2013
I texperience preview_phase1
Startup weekend@slovakia
StartupWeekend Zilina #1 - Friday
Ako prezentovat aj pred investorom
StartupWeekend Kosice 2012 Final pitches
StartupWeekend Kosice - saturday
StartupWeekend Kosice opening
StartupWeekend Bratislava invitation 2012
StartupWeekend Bratislava

ITexperience - AngularJS

  • 1. Svet JavaScriptu Ladislav Gažo gazo@seges.sk @ladislavGazo
  • 2. JavaScript.... whaaat? 2 | Internal use only
  • 3. 3 | Internal use only
  • 4. JavaScript • JavaScript (JS) is an open • JavaScript is: source client-side scripting – Prototype-based language commonly – Dynamic implemented as part of a – Weakly-typed web browser in order to – Has First-class functions create enhanced user – Influenced by C & interfaces and dynamic websites. Java,... 4 | Internal use only
  • 5. Basics • <script> tag • var a = 7; • if, then, else • for, while • namespaces • functions • web server – Apache, nginx 5 | Internal use only
  • 6. JavaScript world • BackboneJS • jQuery • underscore • YUI • EmberJS • node.js • CanJS • TypeScript • MeteorJS • Closure • EsteJS 6 | Internal use only
  • 7. Tools • Chrome Developer Tools • Firebugs • IE Developer Toolbar • Opera • Editor: vim, webstorm, sublime text, notepad,... 7 | Internal use only
  • 8. A co to ten angulár umí? • Data binding • Controller • Plain JavaScript • Validation • Server communication • Directives • Injection • Testing 8 | Internal use only
  • 9. <h2>BizMon</h2> <div id="bizmonApp" ng-controller="BizmonCtrl"> <div class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <a class="brand" href="#">Bizmon</a> <ul class="nav"> <li ng-repeat="project in projects"> <a ng-href="#/projects/ {{project.id}}">{{project.name}}</a> </li> </ul> </div> </div> </div> <div class="container-fluid"> <div class="row-fluid" ng-view></div> <footer> <p>&copy; Seges 2012</p> </footer> </div> </div> 9 | Internal use only
  • 10. Curly brackets? In HTML? 10 | Internal use only
  • 11. function BizmonCtrl($scope, projectService) { $scope.projects = projectService.query(); } BizmonCtrl.$inject = ["$scope", "projectService"]; 11 | Internal use only
  • 12. angular.module('bizmonApp.services', [ 'ngResource' ]).factory( 'projectService', function($resource) { var service = $resource('rest/projects/:projectId', {}, {}); return service; }); mvn -o archetype:generate -DarchetypeGroupId=sk.seges.acris.archetype -DarchetypeArtifactId=acris-archetype-rest-server ( AcrIS - http://acris.googlecode.com ) 12 | Internal use only
  • 13. ng-click wohohooo 13 | Internal use only
  • 14. <tr ng-repeat="issueState in prjScope.issueStates"> <td ng-class="'operation-' + issueState.operation"> <a ng-click="editIssue(issueState)">{{issueState.uuid}}</a> </td> <td>{{issueState.reason}}</td> <td> <span class="btn-group" ng-show="projectScopeViews[prjScope.id].edit"> <a class="btn btn-primary" ng-click="toggleOperation(issueState)"> <span ng-bind="issueState.operation"></span> </a> <a class="btn btn-danger" ng-click="deleteIssue(prjScope, issueState)">Delete</a> </span> </td> </tr> 14 | Internal use only
  • 15. <input type="textarea" ng-model="activeIssueState.reason" placeholder="optional reason why you are creating the issue" size="4"/> 15 | Internal use only
  • 17. var inputNameDirective = ['$interpolate', function($interpolate) { return { restrict: 'A', scope: { inputName: 'attribute', ngModel: 'accessor' }, require: ['ngModel','^?form'], link: function (scope, element, attrs, ctrl) { var ex = $interpolate(scope.inputName); scope.nameTransformed = ex(scope.$parent); var modelCtrl = ctrl[0]; modelCtrl.$name = scope.nameTransformed; var formCtrl = ctrl[1] || nullFormCtrl; formCtrl.$addControl(modelCtrl); } }; }]; angular.module('bizmonApp.directives',[]).directive('inputName', inputNameDirective); 17 | Internal use only
  • 18. 18 | Internal use only
  • 19. WORK with US WebElement Java Group Rubyslava Thank you for your patience gazo@seges.sk @ladislavGazo 19 | Internal use only
  • 20. Links BizMon project - https://github.com/lgazo/bizmon • AcrIS – http://acris.googlecode.com • AngularJS – http://angularjs.org • GDG – http://www.meetup.com/GTUG-Slovakia/ – https://www.facebook.com/groups/149659868513109/ – https://plus.google.com/115200570829527654069 • Java Group - https://www.facebook.com/groups/359487710807375/ 20 | Internal use only