Skip to content

Instantly share code, notes, and snippets.

@karlkori
Last active November 12, 2015 10:14
Show Gist options
  • Select an option

  • Save karlkori/c73409c2b8c49abe652d to your computer and use it in GitHub Desktop.

Select an option

Save karlkori/c73409c2b8c49abe652d to your computer and use it in GitHub Desktop.
How use js libs in Angular
/* include js lib (lodash) before angular! */
'use strict';
angular
.module('app', [])
.factory('_', ['$window', function($window) {
return $window._;
}])
.controller('MainCtrl', ['$scope', '_',
function($scope, _) {
}
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment