severe problem with ng-include #71

Closed
nogece opened this Issue Nov 15, 2012 · 1 comment

2 participants

@nogece

Hi,

There is a problem with ng-include.

Sorry for not providing a jsfiddle.. that wont work for ng-include. Following a simple example and stacktrace

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script
    src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
</script>

<script
    src="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
<script src="lib/angular/angular.js"></script>
<script type="text/javascript">
</script>
<script src="lib/jquery-mobile-angular-adapter-1.1.2-SNAPSHOT.js"></script>


</head>
<body ng-app>
    <div ng-include src="'something.html'"></div>
    </div>
    <!-- comment the following in to reproduce ! -->
    <!-- 
    <div ng-include src="'something.html'"></div>
    </div>
     -->
</body>
</html>

Error: element[0] is undefined
@http://localhost:8080/fuelcheck_client/lib/jquery-mobile-angular-adapter-1.1.2-SNAPSHOT.js:375
@http://localhost:8080/fuelcheck_client/lib/jquery-mobile-angular-adapter-1.1.2-SNAPSHOT.js:171
@http://localhost:8080/fuelcheck_client/lib/angular/angular.js:12851
@http://localhost:8080/fuelcheck_client/lib/angular/angular.js:8663
@http://localhost:8080/fuelcheck_client/lib/angular/angular.js:6623
@http://localhost:8080/fuelcheck_client/lib/angular/angular.js:6660
@http://localhost:8080/fuelcheck_client/lib/angular/angular.js:7808
@http://localhost:8080/fuelcheck_client/lib/angular/angular.js:7680
@http://localhost:8080/fuelcheck_client/lib/jquery-mobile-angular-adapter-1.1.2-SNAPSHOT.js:281
@http://localhost:8080/fuelcheck_client/lib/jquery-mobile-angular-adapter-1.1.2-SNAPSHOT.js:319
@http://localhost:8080/fuelcheck_client/lib/angular/angular.js:7894
@http://localhost:8080/fuelcheck_client/lib/jquery-mobile-angular-adapter-1.1.2-SNAPSHOT.js:273
done@http://localhost:8080/fuelcheck_client/lib/angular/angular.js:8883
completeRequest@http://localhost:8080/fuelcheck_client/lib/angular/angular.js:9023

Best,
No

@tbosch tbosch closed this Nov 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment