Salut, je commence par la formation du grafikart du AngularJS mais au 2éme vidéo (controller & scope) je trouve un probléme au cours d'envoyer des données qui écrit dans la controller à la vie

voici code

        <!DOCTYPE html>
        <html>
        <head>
            <title></title>
        </head>
        <body ng-app>

        <input type="text" ng-model="test1" placeholder="ecrire ici">
            <select ng-model="order">
                <option value="username">username</option>
                <option value="content">content</option>
            </select>

            <div ng-controller="CommentsCtrl">

            <div ng-repeat="comment in comments | filter: {content:test1 } | orderBy: order ">
                <p>{{ comment.username }}</p><br />
                {{ comment.content }}
            </div>
        </div>

        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>

        <script >
            function CommentsCtrl($scope) {
                $scope.comments = 
                    [
          {
            "username": "function (a){return e.gender=a||(this.bool()?\"male\":\"female\"),e.name=c.getItem(e.gender+\"FirstNames\"),e.name}",
            "city": "function (){return c.getItem(\"cities\")}",
            "email": "function (a){var b=e.name||this.firstName(),c=e.surname||this.surname(),d=e.company||this.company();return a&&(b=this.firstName(),c=this.surname(),d=this.company()),(b+c+\"@\"+d+\".com\").toLowerCase()}",
            "content": "Commodo sit fugiat ipsum velit. In cupidatat proident ea aliquip dolore dolore. Anim qui ea cillum duis incididunt mollit mollit exercitation in deserunt nisi ullamco enim. Quis dolor id minim cupidatat dolore enim fugiat excepteur eiusmod culpa velit aliquip. Tempor proident laborum minim dolore eu id veniam."
          },
          {
            "username": "function (a){return e.gender=a||(this.bool()?\"male\":\"female\"),e.name=c.getItem(e.gender+\"FirstNames\"),e.name}",
            "city": "function (){return c.getItem(\"cities\")}",
            "email": "function (a){var b=e.name||this.firstName(),c=e.surname||this.surname(),d=e.company||this.company();return a&&(b=this.firstName(),c=this.surname(),d=this.company()),(b+c+\"@\"+d+\".com\").toLowerCase()}",
            "content": "Occaecat sint ea dolor consequat aliquip minim nisi nulla elit. Irure labore sint cillum aute laborum. Est et proident enim culpa occaecat est dolor consequat pariatur irure. Ullamco laboris pariatur voluptate duis velit. Laboris ullamco velit laborum velit mollit."
          },
          {
            "username": "function (a){return e.gender=a||(this.bool()?\"male\":\"female\"),e.name=c.getItem(e.gender+\"FirstNames\"),e.name}",
            "city": "function (){return c.getItem(\"cities\")}",
            "email": "function (a){var b=e.name||this.firstName(),c=e.surname||this.surname(),d=e.company||this.company();return a&&(b=this.firstName(),c=this.surname(),d=this.company()),(b+c+\"@\"+d+\".com\").toLowerCase()}",
            "content": "Ipsum est enim ullamco aliquip est fugiat officia. Occaecat in qui sit labore deserunt duis in est culpa qui eiusmod. Tempor quis ea incididunt mollit. Labore exercitation aliqua ut voluptate. Sit fugiat Lorem elit proident duis qui anim mollit est esse ex Lorem."
          },
          {
            "username": "function (a){return e.gender=a||(this.bool()?\"male\":\"female\"),e.name=c.getItem(e.gender+\"FirstNames\"),e.name}",
            "city": "function (){return c.getItem(\"cities\")}",
            "email": "function (a){var b=e.name||this.firstName(),c=e.surname||this.surname(),d=e.company||this.company();return a&&(b=this.firstName(),c=this.surname(),d=this.company()),(b+c+\"@\"+d+\".com\").toLowerCase()}",
            "content": "Labore pariatur cupidatat aliqua qui sunt sunt dolore irure do minim laboris do. Culpa aliquip cupidatat eu ad enim tempor enim laborum aliqua. Magna quis duis ullamco minim officia nisi tempor magna exercitation consectetur non mollit est aliqua. Officia laboris dolore mollit irure adipisicing adipisicing laborum. Esse excepteur ad incididunt exercitation do ut ut ut culpa."
          },
          {
            "username": "function (a){return e.gender=a||(this.bool()?\"male\":\"female\"),e.name=c.getItem(e.gender+\"FirstNames\"),e.name}",
            "city": "function (){return c.getItem(\"cities\")}",
            "email": "function (a){var b=e.name||this.firstName(),c=e.surname||this.surname(),d=e.company||this.company();return a&&(b=this.firstName(),c=this.surname(),d=this.company()),(b+c+\"@\"+d+\".com\").toLowerCase()}",
            "content": "Tempor sit voluptate id nulla. Ad eu excepteur occaecat voluptate sint non id reprehenderit aute non. Dolor consectetur eu amet deserunt cillum eu. Eiusmod proident elit eu ea quis nulla aute magna ullamco minim amet velit commodo do. Ea pariatur culpa ullamco dolore consectetur labore Lorem velit laborum consequat."
          },
          {
            "username": "function (a){return e.gender=a||(this.bool()?\"male\":\"female\"),e.name=c.getItem(e.gender+\"FirstNames\"),e.name}",
            "city": "function (){return c.getItem(\"cities\")}",
            "email": "function (a){var b=e.name||this.firstName(),c=e.surname||this.surname(),d=e.company||this.company();return a&&(b=this.firstName(),c=this.surname(),d=this.company()),(b+c+\"@\"+d+\".com\").toLowerCase()}",
            "content": "Fugiat tempor dolore id enim quis. Ad aute anim occaecat consequat commodo sit excepteur ullamco sint in excepteur minim voluptate non. Occaecat sint est do ea ad velit tempor non. Veniam pariatur dolore ipsum pariatur excepteur ea culpa aute est et deserunt nulla. Occaecat commodo reprehenderit exercitation veniam cillum pariatur laboris."
          },
          {
            "username": "function (a){return e.gender=a||(this.bool()?\"male\":\"female\"),e.name=c.getItem(e.gender+\"FirstNames\"),e.name}",
            "city": "function (){return c.getItem(\"cities\")}",
            "email": "function (a){var b=e.name||this.firstName(),c=e.surname||this.surname(),d=e.company||this.company();return a&&(b=this.firstName(),c=this.surname(),d=this.company()),(b+c+\"@\"+d+\".com\").toLowerCase()}",
            "content": "Esse Lorem ad ipsum irure fugiat pariatur amet pariatur ad non enim nulla fugiat ex. Qui sit dolore labore do ad dolor labore. Exercitation ad veniam officia eiusmod ex adipisicing ipsum labore qui aute proident culpa laborum nisi. Labore labore duis eiusmod cupidatat ullamco esse eiusmod incididunt velit incididunt id aute eu dolor. Pariatur est amet id officia."
          }
        ];

            }
        </script>

        </body>
        </html>

voici capture du probléme

2 réponses


med001
Auteur

aide moi s'il vous plait

Tu as un lien dans l'erreur, tu as pensé a simplement cliquer dessus ?
Et si on te répond pas dans la journée pas la peine de ré-up ton sujet. Attends un peu.