Core files with basic layout set up

This commit is contained in:
jcreek
2017-04-01 11:59:03 +01:00
committed by GitHub
parent d5487a9a76
commit 14a7596078
4 changed files with 274 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
(function(){
// Declare App
var app = angular.module('testApp',[]);
// Create Controller
app.controller('testController', function($scope){
// Data
$scope.title = "Hello, World!";
$scope.products = [
{
name: 'Product One',
price: 2,
forSale: true
},
{
name: 'Product Two',
price: 5,
forSale: false
},
{
name: 'Product Three',
price: 9,
forSale: true
}
];
// Add Product Functionality
$scope.addProduct = function(){
$scope.products.push($scope.newProduct);
$scope.newProduct = {};
};
// End Controller
});
// End App
})();