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

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

Closed
bradmartin opened this issue Aug 24, 2015 · 18 comments
Closed

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

bradmartin opened this issue Aug 24, 2015 · 18 comments

Comments

@bradmartin
Copy link

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

@bradmartin bradmartin changed the title Master - 'appSvgIconSets' module undefined Master v0.10.1-master-814e58b - 'appSvgIconSets' module undefined Aug 24, 2015
@jbraccini
Copy link

+1

3 similar comments
@aaronchar
Copy link

+1

@kschwidder
Copy link

+1

@srikanthnadella
Copy link

+1

@ThomasBurleson
Copy link
Contributor

@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.

@srikanthnadella
Copy link

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

@bradmartin
Copy link
Author

@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.

@ThomasBurleson
Copy link
Contributor

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.

@bradmartin
Copy link
Author

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.

@icchio
Copy link

icchio commented Aug 24, 2015

@Aaron-Hartwig
Copy link
Contributor

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

@ghost
Copy link

ghost commented Aug 24, 2015

+1

2 similar comments
@mjsgreen01
Copy link

+1

@andresob
Copy link

+1

@mjsgreen01
Copy link

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);
});

@ghost
Copy link

ghost commented Aug 24, 2015

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
Copy link

ghost commented Aug 24, 2015

@ngraef
Copy link
Contributor

ngraef commented Aug 24, 2015

@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 814e58b. Before that, iconDirective.js defined the material.components.icon module, so the module regex ignored appSvgIconSets.

kennethcachia pushed a commit to kennethcachia/material that referenced this issue Sep 23, 2015
update buildNgMaterialDefinition() regExp to search for module definitions of 'material.*'.

excludes any extraneous, demo-related module definitions.
use `material.layout` to match `material.animate`

Fixes angular#4305.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests