{{ foo }} or <div ng-bind="foo />
{{ foo && bar }} {{ bar || baz }} {{ foo ? bar : baz }}
{{ foo | lowercase }}
.filter('filterName', function() {
return function(input) {
// do work
return output;
}
});
.controller('controllerName', function($scope) {
// controller definition
});
.factory('foo', function(fooService) {
});
.factory('foo', ['fooService', function(fooService) {
}]);
.factory('fooService', function($http) {
var fooService = {
// some behavior here using $http
};
return fooService;
});
.directive('myAwesomeThing', function() {
return {
restrict: 'A',
template: '<div>{{ thing }}</div>',
link: function(scope, element, attr) {
// custom behavior and DOM manipulation here
}
}
}
<div my-awesome-thing="thing">