Skip to content

Commit 7cef435

Browse files
committed
fixed build
1 parent 1de8228 commit 7cef435

4 files changed

Lines changed: 20 additions & 9 deletions

File tree

src/filters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ foreach({
3434
return text;
3535
},
3636

37-
'date': function(amount) {
37+
'date': function(date) {
3838
},
3939

4040
'json': function(object) {

src/jqLite.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,18 @@ function jqClearData(element) {
3737
}
3838

3939
function getStyle(element) {
40-
var current = {}, style = element[0].style, value;
41-
for (var name in style) {
42-
value = style[name];
43-
if (1*name != name && name != 'cssText' && value && typeof value == 'string' && value !='false')
44-
current[name] = value;
40+
var current = {}, style = element[0].style, value, name, i;
41+
if (typeof style.length == 'number') {
42+
for(i = 0; i < style.length; i++) {
43+
name = style[i];
44+
current[name] = style[name];
45+
}
46+
} else {
47+
for (name in style) {
48+
value = style[name];
49+
if (1*name != name && name != 'cssText' && value && typeof value == 'string' && value !='false')
50+
current[name] = value;
51+
}
4552
}
4653
return current;
4754
}

test/AngularSpec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
beforeEach(function(){
2+
compileCache = {};
3+
});
4+
15
describe('Angular', function(){
26
xit('should fire on updateEvents', function(){
37
var onUpdateView = jasmine.createSpy();

test/directivesSpec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ describe("directives", function(){
7373
});
7474

7575
it('should have $element set to current bind element', function(){
76-
var innerText;
76+
var innerText = 'blank';
7777
angularFilter.myFilter = function(text){
7878
innerText = this.$element.text();
7979
return text;
8080
};
81-
var scope = compile('<div>before<div ng:bind-template="{{\'HELLO\'|myFilter}}">INNER</div>after</div>');
81+
var scope = compile('<div>before<span ng:bind-template="{{\'HELLO\'|myFilter}}">INNER</span>after</div>');
8282
expect(scope.$element.text()).toEqual("beforeHELLOafter");
8383
expect(innerText).toEqual('INNER');
8484
});
@@ -206,7 +206,7 @@ describe("directives", function(){
206206
expect(element.hasClass('ng-exception')).toBeFalsy();
207207
});
208208

209-
it('should preserve and remove previus style', function(){
209+
it('should preserve and remove previous style', function(){
210210
var scope = compile('<div style="color:red;" ng:style="myStyle"></div>');
211211
scope.$eval();
212212
expect(getStyle(element)).toEqual({color:'red'});

0 commit comments

Comments
 (0)