ممنون میشم بگیذ ایراد کجاس...
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="todo.aspx.cs" Inherits="todo" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link href="Content/bootstrap.css" rel="stylesheet" /> <script src="Scripts/angular.js"></script> </head> <body ng-app="" ng-controller="ToDolist"> <form id="form1" runat="server"> <div class="page-header"> <h1>{{todo.Done}} to do list</h1> </div> <div class="panel"> <div class="input-group"> <input class="form-control" /> <span class="input-group-btn"> <button class="btn btn-default">click</button> </span> </div> <table class="table"> <thead> <tr> <th>Description</th> <th>Done</th> </tr> </thead> <tbody> <tr ng-repeat="item in todoapp"> <td>{{item.Description}}</td> <td>{{item.Done}}</td> </tr> </tbody> </table> </div> </form> <script src="Scripts/jquery-1.9.1.js"></script> <script src="Scripts/bootstrap.min.js"></script> <script type="text/javascript"> var todoapp = angular.module("ToDoapp", []); todoapp.controller("ToDoCtrl", function ($scope) { $scope.todoapp = [ { Description: "AngularJs", Done: "The best framework for sync project, teach by Esmaeil Sheidaei" }, { Description: "SignalR", Done: "A framework for sync project with repository, teach by Esmaeil Sheidaei" }, { Description: "Knouckout", Done: "The knouckout is a framework for binding elements, teach by Esmaeil Sheidaei" } ] }); </script> </body> </html>
مشکل کجاست ؟
کد فوق چه مشکلی داره ؟
موارد موجود در کنترلر رو نشون نمیده
مقدار ng-app رو خالی کردی باید به صورت زیر قرار بدی
<body ng-app="
ToDoapp" ng-controller=
"ToDolist"
>
همچنین بهتره تمام اسکریپت ها رو در انتهای صفحه قبل از تگ body قرار بدی
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)