Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(build): closure build needs @ngInject to $mdUtil
Browse files Browse the repository at this point in the history
Without this, closure compiler renaming breaks injection.

*  also needs @ngInject to $mdMedia
*  also needs @ngInject to core.js files.

Closes #7611. Closes #7609. Closes #7608.
  • Loading branch information
mhansen authored and ThomasBurleson committed Mar 19, 2016
1 parent b72ef7c commit 7223ea4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ angular
/**
* Detect if the ng-Touch module is also being used.
* Warn if detected.
* @ngInject
*/
function DetectNgTouch($log, $injector) {
if ( $injector.has('$swipe') ) {
Expand All @@ -28,7 +29,9 @@ function DetectNgTouch($log, $injector) {
}
}


/**
* @ngInject
*/
function MdCoreConfigure($provide, $mdThemingProvider) {

$provide.decorator('$$rAF', ["$delegate", rAFDecorator]);
Expand All @@ -40,6 +43,9 @@ function MdCoreConfigure($provide, $mdThemingProvider) {
.backgroundPalette('grey');
}

/**
* @ngInject
*/
function rAFDecorator($delegate) {
/**
* Use this to throttle events that come in often.
Expand Down
1 change: 1 addition & 0 deletions src/core/util/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ angular.module('material.core')
* $scope.anotherCustom = $mdMedia('max-width: 300px');
* });
* </hljs>
* @ngInject
*/

function mdMediaFactory($mdConstant, $rootScope, $window) {
Expand Down
3 changes: 3 additions & 0 deletions src/core/util/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ angular
.module('material.core')
.factory('$mdUtil', UtilFactory);

/**
* @ngInject
*/
function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $interpolate, $log, $rootElement, $window) {
// Setup some core variables for the processTemplate method
var startSymbol = $interpolate.startSymbol(),
Expand Down

0 comments on commit 7223ea4

Please sign in to comment.