File tree Expand file tree Collapse file tree 4 files changed +83
-19
lines changed Expand file tree Collapse file tree 4 files changed +83
-19
lines changed Original file line number Diff line number Diff line change
1
+ node_modules /
2
+ bower_components /
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " angular-scroll-pane" ,
3
+ "version" : " 0.0.0" ,
4
+ "homepage" : " https://github.com/lght/angular-scroll-pane" ,
5
+ "authors" : [
6
+ " Geoffrey Bauduin <[email protected] >"
7
+ ],
8
+ "description" : " AngularJS bindings for jScrollPane" ,
9
+ "main" : " dist/angular-scroll-pane.min.js" ,
10
+ "moduleType" : [
11
+ " node"
12
+ ],
13
+ "keywords" : [
14
+ " angularjs" ,
15
+ " angular" ,
16
+ " jscrollpane" ,
17
+ " scroll" ,
18
+ " pane"
19
+ ],
20
+ "license" : " MIT" ,
21
+ "ignore" : [
22
+ " **/.*" ,
23
+ " node_modules" ,
24
+ " bower_components" ,
25
+ " test" ,
26
+ " tests"
27
+ ],
28
+ "dependencies" : {
29
+ "jquery" : " ~2.1.1" ,
30
+ "angularjs" : " ~1.2.23" ,
31
+ "jscrollpane" : " ~2.0.14"
32
+ }
33
+ }
Original file line number Diff line number Diff line change 1
- angular
2
- . module ( 'app' )
3
- . directive ( 'scrollPane' , function ( ) {
4
-
5
- return {
6
- restrict : 'A' ,
7
- transclude : true ,
8
- template : '<div class="scroll-pane"><div ng-transclude></div></div>' ,
9
- link : function ( scope , elem , $attrs ) {
10
- var config = { } ;
11
- if ( $attrs . scrollConfig ) {
12
- config = scope . $eval ( $attrs . scrollConfig ) ;
13
- }
14
- jQuery ( function ( ) {
15
- jQuery ( ".scroll-pane" ) . jScrollPane ( config ) ;
16
- } ) ;
17
- } ,
18
- replace : true
1
+ angular . module ( "ngJScrollPane" , [ ] ) ;
2
+ angular . module ( "ngJScrollPane" ) . directive ( "scrollPane" , function ( ) {
3
+ return {
4
+ restrict : 'A' ,
5
+ transclude : true ,
6
+ template : '<div class="scroll-pane" ng-class="class" ng-id="id"><div ng-transclude></div></div>' ,
7
+ scope : {
8
+ class : "@" ,
9
+ id : "@"
19
10
}
11
+ link : function ( scope , elem , $attrs ) {
12
+ var config = { } ;
13
+ if ( $attrs . scrollConfig ) {
14
+ config = scope . $eval ( $attrs . scrollConfig ) ;
15
+ }
16
+ jQuery ( function ( ) {
17
+ jQuery ( "#" + scope . id ) . jScrollPane ( config ) ;
18
+ } ) ;
19
+ } ,
20
+ replace : true
21
+ }
20
22
21
- } ) ;
23
+ } ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " angular-scroll-pane" ,
3
+ "version" : " 0.0.0" ,
4
+ "description" : " AngularJS bindings for jScrollPane" ,
5
+ "main" : " jscrollpane.js" ,
6
+ "scripts" : {
7
+ "test" : " echo \" Error: no test specified\" && exit 1"
8
+ },
9
+ "repository" : {
10
+ "type" : " git" ,
11
+ "url" : " git://github.com/lght/angular-scroll-pane"
12
+ },
13
+ "keywords" : [
14
+ " angularjs" ,
15
+ " jscrollpane" ,
16
+ " scroll" ,
17
+ " pane"
18
+ ],
19
+ "author" :
" Geoffrey Bauduin <[email protected] >" ,
20
+ "license" : " MIT" ,
21
+ "bugs" : {
22
+ "url" : " https://github.com/lght/angular-scroll-pane/issues"
23
+ },
24
+ "devDependencies" : {
25
+ "bower" : " ~1.3.9"
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments