Skip to content

ball6847/angular-responsify.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-responsify.js

Responsive utility for angularjs build on top of RxJS and MatchMedia. Add ability to call $scope.$digest() on viewport changed.

Installation

Simply install from github for now (will be published to npm registry soon)

$ yarn add rx-angular angular-media-queries ball6847/angular-responsify.js#master

Import to your angularjs application and inject it into your component.

import angular from 'angular'
import 'rx-angular'
import 'angular-media-queries'
import 'angular-responsify'

angular.module('yourApp', ['angular-responsify'])
  .component('yourComponent', {
    template: 'current screen: {{ screenSize.get() }}',
    controller: ['$scope', 'responsify', ($scope, responsify) => {
      responsify($scope)

      // screenSize now available in your $scope and ready to use in template
    }]
  })

TODO

  • Publish NPM package
  • Remove dependencies

Author

Porawit Poboonma

Releases

No releases published

Packages

No packages published