Skip to content
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

Allow definition of breakpoints in $cssProvider.defaults #14

Closed
alexcastillo opened this issue Feb 2, 2015 · 0 comments
Closed

Allow definition of breakpoints in $cssProvider.defaults #14

alexcastillo opened this issue Feb 2, 2015 · 0 comments
Assignees
Milestone

Comments

@alexcastillo
Copy link
Member

Allow definition of breakpoints in $cssProvider.defaults

This will allow the user to reference a breakpoint as opposed to be using the same media queries over and over.

The API should look like this:

myApp.config(function($routeProvider, $cssProvider) {

  angular.extend($cssProvider.defaults, {
    breakpoints: {
      mobile: '(max-width : 768px)',
      desktop: '(min-width : 769px) and (max-width : 1219px)',
      kiosk: '(min-width : 1220px)'
    }
  });

  $routeProvider
    .when('/black', {
      title: 'Black',
      templateUrl: 'pages/black/page-black.html',
      css: [
        {
          href: 'pages/black/page-black.mobile.css',
          breakpoint: 'mobile'
        }, {
          href: 'pages/black/page-black.desktop.css',
          breakpoint: 'desktop'
        }, {
          href: 'pages/black/page-black.kiosk.css',
          breakpoint: 'kiosk'
        }
      ]
    })

});
@alexcastillo alexcastillo self-assigned this Feb 2, 2015
@alexcastillo alexcastillo added this to the v1.0.7 milestone Feb 2, 2015
alexcastillo pushed a commit that referenced this issue Feb 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant