This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular | |
.module('store') | |
.constant('productListActiveClass', 'active') | |
.controller('productListController', function ($scope, $filter, productListActiveClass) { | |
var selectedCategory = null; | |
$scope.selectCategory = function (categoryName) { | |
selectedCategory = categoryName; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var todoApp, | |
model; | |
model = { | |
user: 'Adam', | |
items: [] | |
}; | |
todoApp = angular.module('todoApp', []); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}, |