42

Angular in the Enterprise

  • Upload
    sbero

  • View
    310

  • Download
    0

Embed Size (px)

DESCRIPTION

Denver 6/2014 Meetup Presentation on different things experienced while using AngularJS in an enterprise environment, some of the ways I've found useful to improve the situation, and some refined development techniques to use in your application development with AngularJS.

Citation preview

Page 1: Angular in the Enterprise
Page 2: Angular in the Enterprise

🌎

Page 3: Angular in the Enterprise
Page 4: Angular in the Enterprise
Page 5: Angular in the Enterprise
Page 6: Angular in the Enterprise

Google AngularJS Style Guidehttps://google-styleguide.googlecode.com/svn/trunk/angularjs-google-style.html

Page 7: Angular in the Enterprise
Page 8: Angular in the Enterprise
Page 9: Angular in the Enterprise
Page 10: Angular in the Enterprise
Page 11: Angular in the Enterprise
Page 12: Angular in the Enterprise
Page 13: Angular in the Enterprise

‘use strict’

angular.controller(‘myController’, [‘$scope’, ’$location’, ’fooService’, ’barService’,

function($scope, $location, fooService, barService){

}]);

Typical Module Definition

Page 14: Angular in the Enterprise

(function(){

‘use strict’

var ctrlName = “myController”;

angular.controller(ctrlName, [‘$scope’, ‘$location’, ‘fooService’, ‘barService’, myController]);

function myController($scope, $location, fooService, barService){…

}

}());

Page 15: Angular in the Enterprise

AngularJS 2.0 Router Design Documenthttps://docs.google.com/document/d/1I3UC0RrgCh9CKrLxeE4sxwmNSBl3oSXQGt9g3KZnTJI/edit

Route Management

Page 16: Angular in the Enterprise

app.js

Page 17: Angular in the Enterprise

app.js

routes.js

Page 18: Angular in the Enterprise
Page 19: Angular in the Enterprise
Page 20: Angular in the Enterprise
Page 21: Angular in the Enterprise
Page 22: Angular in the Enterprise
Page 23: Angular in the Enterprise
Page 24: Angular in the Enterprise

/*** Custom checkbox style for app** Usage: * <custom-checkbox * checked=“checkedVal” // boolean* predicate=“predicateVal”> // string* </custom-checkbox>**/app.directive(‘customCheckbox’, function(){

return {scope: {

‘checked’:’=‘,‘predicate’:’=‘

}…

}});

app.directive(‘customCheckbox’, function(){

return {scope: {

‘checked’:’=‘,‘predicate’:’=‘

}…

}});

Page 25: Angular in the Enterprise
Page 26: Angular in the Enterprise
Page 27: Angular in the Enterprise
Page 28: Angular in the Enterprise
Page 29: Angular in the Enterprise

Ctrl + Alt + ICmd + Alt + I

Page 30: Angular in the Enterprise
Page 31: Angular in the Enterprise
Page 32: Angular in the Enterprise

JSBin Repohttps://github.com/jsbin/jsbin/

Page 33: Angular in the Enterprise
Page 34: Angular in the Enterprise
Page 35: Angular in the Enterprise
Page 36: Angular in the Enterprise
Page 37: Angular in the Enterprise
Page 38: Angular in the Enterprise
Page 39: Angular in the Enterprise

How do I “think in AngularJS” if I have a jQuery background?http://stackoverflow.com/questions/14994391/how-do-i-think-in-angularjs-if-i-have-a-jquery-background

Service vs Provider vs Factoryhttp://stackoverflow.com/questions/15666048/angular-js-service-vs-provider-vs-factory

Difference Between ‘Link’, ‘Controller’ and ‘Compile’ for Directiveshttp://stackoverflow.com/questions/12546945/difference-between-the-controller-link-and-compile-functions-when-definin

Understanding Scopeshttps://github.com/angular/angular.js/wiki/Understanding-Scopes

Page 40: Angular in the Enterprise
Page 41: Angular in the Enterprise
Page 42: Angular in the Enterprise