angular-theme
v1.1.0
Published
Dynamic style and layout switching using Angular
Downloads
7
Readme
Angular Theme
Dynamic style and layout switching using Angular
API
Loading Themes
<head>
<link href="/basic.css" ng-theme="basic" default />
<link href="/dark.css" ng-theme="dark" />
</head>
Attributes:
ng-theme
- Tells angular-theme about the style, and gives it a name for future referencedefault
- Specifies the style to show on load
Managing Themes Programatically
angular.controller('MyController', function($scope, $theme) {
$scope.theme = $theme.activeTheme;
$scope.$watch('theme', $theme.setTheme);
});
License
MIT