Skip to content

Fix for using only component router #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion angular-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,11 @@
}
// Add all stylesheets from ngRoute to array
if ($injector.has('$route')) {
Array.prototype.push.apply(stylesheets, $css.getFromRoutes($injector.get('$route').routes));
var routeService = $injector.get('$route');
if (routeService) {
// fix when only component router is used
Array.prototype.push.apply(stylesheets, $css.getFromRoutes(routeService.routes));
}
}
// Add all stylesheets from UI Router to array
if ($injector.has('$state')) {
Expand Down
2 changes: 1 addition & 1 deletion angular-css.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
{
"name": "angular-css",
"main": "./angular-css.js",
"version": "1.0.8",
"version": "1.0.9",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you not bum the version? That way I can plan better what goes into what version.

"homepage": "http://castillo-io.github.io/angular-css",
"authors": [
"Alex Castillo <alex@castillo.io>"
"Alex Castillo <alex@castillo.io>",
"Gleb Sevruk <sevruk.gleb@gmail.com>"
],
"description": "CSS on-demand for AngularJS",
"keywords": [
"angularjs",
"ng-route",
"ui-router",
"component-router",
"css"
],
"dependencies": {
"angular": ">= 1.3.0"
},
"repository": {
"type": "git",
"url": "git://github.com/castillo-io/angular-css"
"url": "git://github.com/Excelion/angular-css"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should remain untouched.

},
"license": "MIT",
"ignore": [
Expand Down