0
<!doctype html>
<html lang='en'>
    <head>
        <meta charset-"UTF-8">
        <title>devang</title>
        <link rel="stylesheet" href="bootstrap.css">
        <script> src="lib/onsen/js/angular/angular.min.js" </script>
        <script> src="lib/onsen/js/angular/angular.js" </script>
    </head>
    <body>
        <div class="container" ng-app="App">
            <div ng-controller="controller">
                <ul>
                    <li ng-repeat="artist in artists">
                        {{artist.name}}
                    </li>
                </ul>
            </div>
        </div>

        <script>
            angular.module('App',[]).
            controller('controller',function($scope,$http){
                $http.get('artists.json').success(function(data){
                    $scope.artists = data;
                });

            });
        </script>
    </body>
</html>

when i execute it shows error

  1. angular is not defined
  2. The character encoding of the HTML document was not declared.

The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. need your suggesions

1 Answer 1

2

Your script tags are defined incorrectly. the SRC should be an attribute of the script tag.

<script src="lib/onsen/js/angular/angular.min.js"></script>
<script src="lib/onsen/js/angular/angular.js"></script>
Sign up to request clarification or add additional context in comments.

2 Comments

thanks for a suggestion. it solved first error but second one still present
Change charset-"UTF-8" to charset="UTF-8"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.