This repository was archived by the owner on Sep 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
src/core/services/theming Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -532,6 +532,12 @@ function ThemingProvider($mdColorPalette, $$mdMetaProvider) {
532
532
* restrict: 'e',
533
533
* link: function(scope, el, attrs) {
534
534
* $mdTheming(el);
535
+ *
536
+ * $mdTheming.defineTheme('myTheme', {
537
+ * primary: 'blue',
538
+ * accent: 'pink',
539
+ * dark: true
540
+ * })
535
541
* }
536
542
* };
537
543
* });
@@ -605,6 +611,24 @@ function ThemingProvider($mdColorPalette, $$mdMetaProvider) {
605
611
* @returns {Function } remove function of the browser color
606
612
*/
607
613
614
+ /**
615
+ * @ngdoc method
616
+ * @name $mdTheming#defineTheme
617
+ * @description
618
+ * Dynamically define a theme by an options object
619
+ *
620
+ * options are:<br/>
621
+ * `primary` - The primary palette of the theme.<br/>
622
+ * `accent` - The accent palette of the theme.<br/>
623
+ * `warn` - The warn palette of the theme.<br/>
624
+ * `background` - The background palette of the theme.<br/>
625
+ * `dark` - Indicates if it's a dark theme.<br/>
626
+ *
627
+ * @param {String } name Theme name to define
628
+ * @param {Object } options Theme definition options
629
+ * @returns {Promise<string> } A resolved promise with the theme name
630
+ */
631
+
608
632
/* @ngInject */
609
633
function ThemingService ( $rootScope , $mdUtil , $q , $log ) {
610
634
// Allow us to be invoked via a linking function signature.
You can’t perform that action at this time.
0 commit comments