File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
var styleDirective = valueFn ( {
4
4
restrict : 'E' ,
5
- terminal : true
5
+ terminal : false
6
6
} ) ;
Original file line number Diff line number Diff line change @@ -9,13 +9,20 @@ describe('style', function() {
9
9
} ) ;
10
10
11
11
12
- it ( 'should not compile style element' , inject ( function ( $compile , $rootScope ) {
13
- element = jqLite ( '<style type="text/css">should {{notBound} }</style>' ) ;
12
+ it ( 'should compile style element' , inject ( function ( $compile , $rootScope ) {
13
+ element = jqLite ( '<style type="text/css">.some-container{ width: {{elementWidth}}px; }</style>' ) ;
14
14
$compile ( element ) ( $rootScope ) ;
15
15
$rootScope . $digest ( ) ;
16
16
17
17
// read innerHTML and trim to pass on IE8
18
- expect ( trim ( element [ 0 ] . innerHTML ) ) . toBe ( 'should {{notBound}}' ) ;
18
+ expect ( trim ( element [ 0 ] . innerHTML ) ) . toBe ( '.some-container{ width: px; }' ) ;
19
+
20
+ $rootScope . $apply ( function ( ) {
21
+ $rootScope . elementWidth = 200 ;
22
+ } ) ;
23
+
24
+ // read innerHTML and trim to pass on IE8
25
+ expect ( trim ( element [ 0 ] . innerHTML ) ) . toBe ( '.some-container{ width: 200px; }' ) ;
19
26
} ) ) ;
20
27
21
28
You can’t perform that action at this time.
0 commit comments