On Github zack9433 / OSDC_Slides
$.ajax({ type: "POST", url: "some.php", data: { name: "John", location: "Boston" } }).done(function( msg ) { console.log( "Data Saved: " + msg ); // put anything yout want to do. });
var isIE = document.attachEvent; var addListener = isIE ? function(e, t, fn) { e.attachEvent('on' + t, fn); } : function(e, t, fn) { e.addEventListener(t, fn, false); }; addListener(window, 'load', function() { var greeting = doucment.getElementById('greeting'); if (isIE) { greeting.innerText = 'Hello World!'; } else { greeting.textContent = 'Hello World!'; } });
ng-app ? ng-model ?
var app = angualr.module('diDemo'); app.controller('MainCtrl', function($scope) { // $scope object is from DI });
var app = angualr.module('diDemo'); app.controller('MainCtrl', ['$scope', function($scope) { // $scope object is from DI }]);