Hi Kristopher, You could use AngularCSS <https://github.com/door3/angular-css> to accomplish this.
https://github.com/door3/angular-css This Angular module allows you to reference stylesheets in your components (directives) and pages (routes). If you are using ngRoute $routeProvider .when('/my-page', { templateUrl: 'my-page/my-page.html', controller: 'pageCtrl', css: 'my-page/my-page.css' }); If you are using directives myApp.directive('miyDirective', function () { return { restrict: 'E', templateUrl: 'my-directive/my-directive.html', css: 'my-directive/my-directive.css' } }); On Wednesday, January 30, 2013 at 11:03:04 AM UTC-5, Kristopher Schultz wrote: > > I'd like to implement simple theming support for an AngularJS application. > Ideally, I'd like to define a route with a "themeId" parameter and use that > parameter to dynamically apply the the appropriate CSS file to the root > page of my app. > > For example, if I define this route... > > $routeProvider.when('/:themeId', { > templateUrl: 'views/main.html', > controller: 'MainCtrl' > }); > > ...then for a URL like this... > > http://mydomain.com/#/fantastic-theme > > ...I want my app to use the CSS file "styles/fantastic-theme.css" > > I'm stumped as to how to go about this. Any suggestions are appreciated. > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
