mirror of
https://github.com/jcreek/AssessmentAnalyser.git
synced 2026-07-14 03:13:48 +00:00
Core files with basic layout set up
This commit is contained in:
@@ -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
|
||||
})();
|
||||
Reference in New Issue
Block a user