Не работает ангуляр
Осваиваю ангуляр. пробую делать валидацию формы, однако вместо ожидаемого true или false в
{{order.$valid}}я получаю все тот же код {{order.$valid}}. Консоль чиста, все скрипты подключены нормально В чем моя проблема? HTML <html> <head ng-app="board"> </head> <body> <div class="popup"> <form name="order" ng-controller="orderForm" novalidate> <fieldset class="form-group"> <input type="text" ng-model="user.name" class="form-control" placeholder="Имя" title="name"/> </fieldset> <fieldset class="form-group"> <textarea ng-model="user.suggestions" class="form-control" placeholder="Ваши пожелания..." title="suggestions" required></textarea> </fieldset> <fieldset class="form-group"> <input ng-model="user.email" type="email" class="form-control" placeholder="jimmyDean@example.org" title="Email" required /> </fieldset> <div>form is {{order.$valid}}</div> <button type="submit">Отправить</button> </form> </div> JS var app = angular.module('board', []); app.controller('orderForm', function ($scope) { $scope.user = {}; }); |
|
Часовой пояс GMT +3, время: 20:45. |