On Github sberan / angularTalk
Hello, ${user}
Hello, <%= user %>
Hello, <%= user %>
?????
Hello, {{user}}
<input type="text" ng-model="user"> Hello, {{user}}
<ul> <li ng-repeat="item in [1,2,3]"> {{item}} </li> </ul>
Becomes:
<ul> <li>1</li> <li>2</li> <li>3</li> </ul>
function MyController($scope) { $scope.greeting = 'Hello, world!'; }
<div ng-controller="MyController"> {{greeting}} </div>
function MyController($scope, $http) { $http.get('/greeting').success(function(data) { $scope.greeting = data; }); }
<div ng-controller="MyController"> {{greeting}} </div>
Custom directives can be used to create reusable components
<tabbar> <tab name="Home" src="index.html"></tab> <tab name="About" src="about.html"></tab> <tab name="Contact" src="contact.html"></tab> </tabbar>
describe('Buzz Client', function() { it('should filter results', function() { input('user').enter('jacksparrow'); element(':button').click(); expect(repeater('ul li').count()).toEqual(10); input('filterText').enter('Bees'); expect(repeater('ul li').count()).toEqual(1); }); });