Skip to content

Instantly share code, notes, and snippets.

View gajus's full-sized avatar

Gajus Kuizinas gajus

View GitHub Profile
describe('Product', function () {
it('must calculate its gross price by adding the VAT', function () {
var product = Product.create('A', 10);
expect(product.grossPrice()).toEqual(12);
});
});
var todoApp;
todoApp = angular.module('todoApp', []);
todoApp.controller('TodoController', function ($scope) {
$scope.todo = {
user: 'Adam',
items: [
{name: 'Get the book', done: true},
{name: 'Finish reading the book', done: false},
<!DOCTYPE html>
<html ng-app="todoApp">
<head>
<title>First Test</title>
<script src="../angular.js"></script>
<script src="./todo.js"></script>
<style>
.warning { color: #f00; }
.success { color: #0f0; }
<!DOCTYPE html>
<html ng-app="todoApp">
<head>
<title>First Test</title>
<script src="../angular.js"></script>
<script src="./todo.js"></script>
<style>
.warning { color: #f00; }
.success { color: #0f0; }
<!DOCTYPE html>
<html ng-app="todoApp">
<head>
<title>First Test</title>
<script src="../angular.js"></script>
<script src="./todo.js"></script>
<style>
.warning { color: #f00; }
.success { color: #0f0; }
<!DOCTYPE html>
<html ng-app="todoApp">
<head>
<title>First Test</title>
<script src="../angular.js"></script>
<script src="./todo.js"></script>
<style>
.warning { color: #f00; }
.success { color: #0f0; }
var todoApp,
model;
model = {
user: 'Adam',
items: []
};
todoApp = angular.module('todoApp', []);
<!DOCTYPE html>
<html ng-app="mainApp">
<head>
<title>Store</title>
<script src="./static/js/angular.js"></script>
<script>
angular
// Injecting customFilterApp to the mainApp, making the components (such as filters and controllers) of the customFilterApp available in the mainApp $scope.
.module('mainApp', ['customFilterApp'])
<!DOCTYPE html>
<html ng-app="mainApp">
<head>
<title>Store</title>
<script src="./static/js/angular.js"></script>
<script>
angular
// Injecting customFilterApp to the mainApp, making the components (such as filters and controllers) of the customFilterApp available in the mainApp $scope.
.module('mainApp', ['customFilterApp'])
<!DOCTYPE html>
<html ng-app="store">
<head>
<title>Store</title>
<script src="./static/js/angular.js"></script>
<script src="./static/js/store.js"></script>
<script src="./static/js/controllers/store.js"></script>
<script src="./static/js/controllers/productListControllers.js"></script>