









<tabs>
<pane heading="Static title">Static content</pane>
<pane ng-repeat="pane in panes"
heading="{{pane.title}}"
active="pane.active">
{{pane.content}}
</pane></tabs>
<div ng-controller="SampleController">
<input ng-model="person.name"/>
<button ng-click="save()"/>
</div>
function SampleController($scope) { $scope.person = {name: "Aitor"} $scope.save = function() { // Hacer algo } }
var app = angular.module('services', []);
app.service('myService', function(){
return {
somefunc: function() {
console.log('Hola mundo');
}
}
});
// El servicio puede inyectarse en cualquier sitio
function SampleController(myService) {
myService.somefunc();
}
<ul>
<li ng-repeat="c in customers | filter:{region: 'Madrid'}">{{c.name}</li> <ul>
<p>{{'SAMPLE_KEY' | localize}}</p>
<p>{{message | pluralize | toUpperCase}}</p
var phonecatApp = angular.module('phonecatApp', [
'ngRoute',
'phonecatControllers'
]);
phonecatApp.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/phones', {
templateUrl: 'partials/phone-list.html',
controller: 'PhoneListCtrl'
}).
when('/phones/:phoneId', {
templateUrl: 'partials/phone-detail.html',
controller: 'PhoneDetailCtrl'
}).
otherwise({
redirectTo: '/phones'
});
}]);



