0

I've set up a small AngularJS/Firebase (AngularFire) page that updates the DOM with a textbox (the classic example). The code works fine in Chrome and Firefox, but not IE10. I've tried the recommended fixes for IE7 and lower but they haven't worked.

HTML:

<!DOCTYPE html>
<html ng-app="myModule">
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.min.js"></script>
    <script src="https:/cdn.firebase.com/v0/firebase.js"></script>
    <script src="https://cdn.firebase.com/libs/angularfire/0.3.0/angularfire.min.js"></script>
    <script src="main.js" type="text/javascript"></script>
</head>
<body ng-controller="myApp">
    <div>
        <input type="text" ng-model="name" /> Hi {{name}}
    </div>
</body>

main.js

angular.module('myModule', ['firebase']).controller('myApp', ['$scope', 'angularFire',
function($scope, angularFire) {
    var url = new Firebase('https://myaccount.firebaseio.com/example');
    angularFire(url, $scope, 'name', '');
}
]);

What could be causing the problem?

Thanks.

4

1 回答 1

1

I assume and hope you've solved this already, but anyway: you have one slash ('/') missing from the URL pointing to firebase.js which makes IE to trip over. Interestingly, other browsers seem to be able to load the script.

You are also missing the starting <head> element.

于 2014-04-22T20:17:29.010 回答