material icon indicating copy to clipboard operation
material copied to clipboard

Master v0.10.1-master-814e58b - 'appSvgIconSets' module undefined

Open bradmartin opened this issue 11 years ago • 18 comments

The current master has an issue with 'appSvgIconSets' module. @ThomasBurleson

bradmartin avatar Aug 24 '15 14:08 bradmartin

+1

jbraccini avatar Aug 24 '15 15:08 jbraccini

+1

VerifiedOrganic avatar Aug 24 '15 15:08 VerifiedOrganic

+1

kschwidder avatar Aug 24 '15 15:08 kschwidder

+1

srikanthnadella avatar Aug 24 '15 16:08 srikanthnadella

@bradmartin - I am not seeing any issue with https://material.angularjs.org/HEAD/#/demo/material.components.icon. Can you provide more details or confirm the issue is resolved ?

Please clear your browser cache and retry.

ThomasBurleson avatar Aug 24 '15 16:08 ThomasBurleson

Hi,

This is the error log when trying to launch my angular app using bower-material/master:

Uncaught Error: [$injector:modulerr] Failed to instantiate module starter due to: Error: [$injector:modulerr] Failed to instantiate module ngMaterial due to: Error: [$injector:modulerr] Failed to instantiate module appSvgIconSets due to: Error: [$injector:nomod] Module 'appSvgIconSets' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. http://errors.angularjs.org/1.3.13/$injector/nomod?p0=appSvgIconSets

srikanthnadella avatar Aug 24 '15 16:08 srikanthnadella

@ThomasBurleson appsvg not present

Don't think the source is actually the master on the demo site. See image. Ignore that the screenshot is of .css file, it's the same for .js file.

I pulled master from bower (issue title version) and the 'appSvgIconSets' is not defined. I went through the material.js file and found some new code but didn't have time to look through it to see if something was left out or not. Sorry for that, got a busy day right now.

bradmartin avatar Aug 24 '15 16:08 bradmartin

screen shot 2015-08-24 at 11 58 10 am

Notice the Demo - Icon uses docs-demo-scripts.js which is where the demo module angular.module('appSvgIconSets'...) is defined.

ThomasBurleson avatar Aug 24 '15 16:08 ThomasBurleson

Got it. In the angular-material.js file the only refs to 'appSvgIconSets' is in the '@usage' comment block line 17741, and in DI for the module. Apologies if I'm missing something as to why this should or should not be working.

bradmartin avatar Aug 24 '15 17:08 bradmartin

same problem for me using https://gitcdn.xyz/repo/angular/bower-material/master/angular-material.js....

icchio avatar Aug 24 '15 17:08 icchio

Also getting this problem on a fiddle demo https://jsfiddle.net/0ju750xo/23/

Aaron-Hartwig avatar Aug 24 '15 17:08 Aaron-Hartwig

+1

ghost avatar Aug 24 '15 17:08 ghost

+1

mjsgreen01 avatar Aug 24 '15 17:08 mjsgreen01

+1

andresob avatar Aug 24 '15 18:08 andresob

adding this fixed it for me: angular.module('appSvgIconSets', ['ngMaterial']) .controller('DemoCtrl', function($scope) {}) .config(function($mdIconProvider) { $mdIconProvider .iconSet('social', 'img/icons/sets/social-icons.svg', 24) .defaultIconSet('img/icons/sets/core-icons.svg', 24); });

mjsgreen01 avatar Aug 24 '15 18:08 mjsgreen01

https://raw.githubusercontent.com/angular/bower-material/master/angular-material.js

Line 13, right in the module definition at the end of the dep list, it's including appSvgIconSets. remove that and your good.

ghost avatar Aug 24 '15 18:08 ghost

The bug must be in this: https://github.com/angular/material/blob/master/scripts/gulp-utils.js

ghost avatar Aug 24 '15 18:08 ghost

@ThomasBurleson The build script is picking up appSvgIconSets from the comments in iconDirective.js when it gets module info in buildNgMaterialDefinition.

This just became an issue bacause of the directory structure changes in 814e58bf1b818ee6a9a22bf1c2dc8f15e9646341. Before that, iconDirective.js defined the material.components.icon module, so the module regex ignored appSvgIconSets.

ngraef avatar Aug 24 '15 19:08 ngraef