This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First name: <input type="text" id="txtFirstName" data-ng-model="user.firstName" />, | |
Last name: <input type="text" id="txtLastName" data-ng-model="user.lastName"/> | |
<button class="btn" id="btnReset" data-ng-click="user.firstName=' ';user.lastName=' ';"> | |
Reset fields | |
</button> | |
<br/> | |
Hello, Mister <i id="lblName">{{user.firstName}} + {{user.lastName}}</i> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table class="key-list" id="products" ng-init="product.price=50; product.qty=3"> | |
<tr><td>Product name</td><td>Price</td><td>Qty</td><td>Total</td></tr> | |
<tr> | |
<td>AngularJS book for newbies</td> | |
<td id="price">{{product.price}}</td> | |
<td id="qty">{{product.qty}}</td> | |
<td id="total">{{product.price*product.qty}}</td> | |
</tr> | |
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div data-ng-controller="ProductController" id="productForm"> | |
Name *: <input type="text" id="inputName" data-ng-model="product.name"/>, | |
Price *: <input type="number" id="inputPrice" data-ng-model="product.price"/> €, | |
Quantity *: <input type="number" id="inputQty" data-ng-model="product.qty"/> | |
<br/> <i id="errorMsg">{{mandatoryMsg}}</i> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="mainApp" ng-controller="MainCtrl"> | |
Hello, {{currentUser.login}} | |
<tabset> | |
<tab heading="Mails" ng-controller="MailCtrl"> | |
<div>You have {{nbMails}} mail(s) in your box.</div> | |
</tab> | |
<tab heading="Profile"> | |
<div ng-controller="EditCtrl"> | |
<input type="text" id="inputLogin" ng-model="tmpLogin"/> | |
<button class="btn" ng-click="editLogin()">Change login</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="userPanel" data-ng-controller="UserCtrl"> | |
There are {{nbUsers}} connected users on the website. | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("ProductUtils Service", function () { | |
var ProductUtils, | |
comments = [ | |
{ | |
"rate": 2, | |
"user": "Laurent Wroblewski", | |
"comment": "Test comment" | |
}, | |
{ | |
"rate": 4, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.controller('CatalogController', ['$scope', '$location', 'catalogService','ProductUtils', 'UserService', function ($scope, $location, catalogService, ProductUtils, UserService) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-controller="SurveyCtrl"> | |
<h3>Survey application</h3> | |
<form name="formSurvey"> | |
Name: <input ng-required="true" type="text"/><br/> <br/> | |
<div ng-repeat="category in categories"> | |
{{category}}: | |
<span ng-repeat="note in notes"> | |
{{note}} | |
<input type="radio" value="{{note}}" ng-model="survey[category]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-app="app"> | |
<div class='html-content'><div ng-controller="ProductRatingCtrl"> | |
<star-rating rating="{{productMarkCss}}">2 comments</star-rating> | |
Mark: | |
<select ng-options="mark for mark in marks" ng-model="productMark" /> | |
</div></div></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div data-ng-app="app"> | |
<div class='html-content'><div data-ng-init="login='Bob'"> | |
<button class="btn" data-ng-click="login=''" data-confirm-click data-message="Are you sure ? ">Reset login</button> | |
Login: {{login}} | |
</div></div></div> |
OlderNewer