I hereby claim:
- I am mgonto on github.
- I am mgonto (https://keybase.io/mgonto) on keybase.
- I have a public key whose fingerprint is 1316 6AE9 2A45 7160 296C DC12 7620 77C0 02B8 68CF
To claim this, I am signing this object:
| angular.module("test").service("Greeting", function() { | |
| this.greet = null; | |
| this.greetTo = function(name) { | |
| this.greet = "Hello " + name; | |
| } | |
| }); | |
| angular.module("test").controller("TestCtrl", function(Greeting) { | |
| $scope.greeting = Greeting; |
I hereby claim:
To claim this, I am signing this object:
| def heapList(heap: H): List[A] = { | |
| if (isEmpty(heap)) { | |
| Nil | |
| } else { | |
| findMin(heap) :: heapList(deleteMin(heap)) | |
| } | |
| } | |
| property("Added and removed elements") = forAll { (h: H, values: List[A]) => | |
| val listOfElemsBefore = heapList(h) |
| angular.controller('MainCtrl', function(Angularytics, $scope) { | |
| $scope.click = function() { | |
| Angularytics.trackEvent("Home Category", "Button clicked"); | |
| } | |
| }); |
| angular.module('sample-app', ['angularytics']) | |
| .config(function(AngularyticsProvider) { | |
| AngularyticsProvider.setEventHandlers(['Console', 'Google']); | |
| }) | |
| .run(function(Angularytics) { | |
| Angularytics.init(); | |
| }); |
| <label>Click here to submit buddy</label> | |
| <input type="submit" | |
| ng-click="doSomething() | trackEvent:'Home Category':'Button clicked'" /> |
| // Assigning promise | |
| // GET /api/v1/users | |
| var users = Restangular.all('users').getList(); | |
| // GET /api/v1/users/123 | |
| var user = Restangular.one('users',123).get(); | |
| // Assigning value | |
| // GET /api/v1/users | |
| Restangular.all('users').getList().success(function(users) { |
| var userResource = $resource('/users/:userId', {}, { | |
| getList: {method: 'GET', params: {}, isArray: true}, | |
| get: {method: 'GET', params: {}, isArray: false}, | |
| }); | |
| var users = userResource.getList(); | |
| var user = userResource.get({userId: 123}) | |
| // Later in the code | |
| var carResource = $resource('/users/:userId/cars/:carId', {}, { |
| module.directive('pie', function () { | |
| return { | |
| replace: true, | |
| restrict: 'EA', | |
| scope: {type: '@', data:'='}, | |
| templateUrl: "/js/test/angular/partials/pie.html", | |
| controller: ['$scope', '$routeParams', '$element', '$filter', function($scope, $routeParams, $element, $filter) { | |
| $scope.$watch('data', function() { | |
| if (_.isUndefined($scope.data) || _.isNull($scope.data) || $filter('isZeroData')($scope.data)) { |
| <div> | |
| <h1>First Tab</h1> | |
| <input type="text" ng-model="query.searchText" /> | |
| <pie data="data.valuesData | forPie" type="valuesPie" /> | |
| </div> |