Angular.Responsive
当视口的宽度发生变化或在用户定义的约束范围内时,注册要执行的回调。
原创想法。
用法
var DEVICE_SMALL = 'small' ;
var DEVICE_LARGE = 'large' ;
angular . module ( 'sample' , [ 'angular.responsive' ] ) ;
angular . module ( 'sample' )
. config ( [ 'responsiveProvider' , config ] ) ;
// define two devices:
// * small 0 < x <= 640
// * large 640 < x
function config ( responsive ) {
respon