<html ng-app="example">
<head>
<script src="http://code.angularjs.org/1.4.8/angular.js"></script>
<script>
var app = angular.module('example', []);
app.controller('MainCtrl', function($scope, $resource) {
$scope.name = 'World';
});
</script>
</head>
<body ng-controller="MainCtrl">
<p>Hello {{name | uppercase}}!</p>
<input ng-model="name"/>
</body>
</html>
<body ng-controller="MainCtrl">
<p>Hello {{name}}!</p>
<input ng-model="name"></input>
</body>
angular.module('example')
.service('UserResource', function($resource) {
return $resource.get('api/users'});
});
console.log($injector);
{
annotate: function annotate(fn){},
get: function getService(serviceName){},
has: function(name){},
instantiate: function instantiate(Type, locals){},
invoke: function invoke(fn, self, locals){}321
}
describe('TDD', function(){
it('Using Jasmine fraimwork with Karma runner', function(){
expect('easy').toBe(true)
})
});
angular.module('example').directive('timeCounter', function () {
return {
template: '<h1>{{minutes}}:{{seconds}}</h1>',
scope: {
remainSeconds: '@'
},
replace: true,
restrict: 'E',
controller: 'timeCoubterCtrl',
link: function ($scope, $element, $attrs) {}
};
});