Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup first controller #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
var app = angular.module('myMuseumApp', []);

app.controller('ExhibitController', function($scope){
$scope.image = 'exhibits.jpg';
$scope.exhibits = 'Life and Theatre';
$scope.name = 'Alexander Tikhonov'

})

app.controller('HourCotroller', function($scope){

$scope.monday = '10am - 9pm';
$scope.tuesday = "10am - 7pm";
$scope.wednesday = "10am - 9pm";
$scope.thursday ="10am - 7pm";
$scope.friday = "11am - 10pm";
$scope.saturday = "11am - 9pm";
$scope.sunday = "11am - 6pm"

})

app.controller('InfoCotroller', function($scope){
$scope.email = '[email protected]';

})
Binary file added exhibits.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<html ng-app="myMuseumApp">
<head>
<meta charset="utf-8">
<title>Moscow Museum of Modern Art</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="app.js"></script>
</head>
<body>
<h1> Moscow Museum of Modern Art</h1>
<div ng-controller="ExhibitController as home">
<h2>Exhibits:</h2>
<!-- <img width="550" alt="picture" src="exhibits.jpg"> -->
<h3>
<img ng-src='{{image}}'>
<br>
{{exhibits}}
<br/>
{{name}}
</h3>
</div>

<section id="opening" ng-controller="HourCotroller">
<h1>General Info</h1>
<h3>Hours:</h3>
{{monday}}
<br>
{{tuesday}}
<br>
{{wednesday}}
<br>
{{thursday}}
<br>
{{friday}}
<br>
{{saturday}}
<br>
{{sunday}}
</section>

<div ng-controller="InfoCotroller">
<h1>Donor Information</h1>
{{email}}
</div>


</body>
</html>