Skip to content

Commit 734999f

Browse files
author
K.C. Hunter
committed
Starting up our new branch
1 parent 75d8b63 commit 734999f

11 files changed

Lines changed: 193 additions & 24 deletions

GruntFile.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ module.exports = function (grunt)
77
separator: "\n\n"
88
},
99
dist: {
10-
src: [],
11-
dest: 'src/resources/js/<%= pkg.name %>.js'
10+
src: ['src/resources/js/**.js'],
11+
dest: 'src/<%= pkg.name %>.js'
1212
},
1313
deps: {
1414
src: [
@@ -17,13 +17,17 @@ module.exports = function (grunt)
1717
'bower_components/bootstrap/dist/js/bootstrap.js',
1818
'bower_components/angularjs/angular.min.js',
1919
],
20-
dest: 'src/resources/js/<%= pkg.name %>-deps.js'
20+
dest: 'src/<%= pkg.name %>-deps.js'
2121
},
2222
css: {
2323
src: ['bower_components/bootstrap/dist/css/bootstrap.min.css',
2424
'src/resources/css/styles.css'
2525
],
26-
dest: 'src/resources/css/<%= pkg.name %>.css'
26+
dest: 'src/<%= pkg.name %>.css'
27+
},
28+
map: {
29+
src: ['bower_components/angularjs/angular.min.js.map'],
30+
dest: 'src/angular.min.js.map'
2731
}
2832
},
2933

README.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Accio Code Tutorials: AngularJS#
22

3-
***Updated: 11-22-14***
43

54
This tutorial series for [AccioCode](https://www.youtube.com/user/CDPAdvertising "Accio Code on YouTube") will show how to use the basics of AngularJS. You will learn how to make a simple web page and a simple web application.
65

@@ -9,14 +8,6 @@ AngularJS is an open-source framework in JavaScript. It was created and maintain
98

109
It is an MVC (Model-View-Controller) framework so a brief understanding of MVC is suggested, but not required, to use this tutorial.
1110

12-
## Course Videos ##
13-
1. [Setting up AngularJS Workspace](https://www.youtube.com/watch?v=ofASsumsf7E "Setting up AngularJS Workspace on YouTube")
14-
2. [Simple Data Binding with AngularJS](https://www.youtube.com/watch?v=ia_vAGm_PCQ "Simple Data Binding with AngularJS")
15-
3. [An Introduction to Controllers](https://www.youtube.com/watch?v=IGy2c-XwXgI "An Introduction to Controllers")
16-
4. [Writing Our First Directive](http://youtu.be/QwaVgz-GSXY "Writing our First Directive")
17-
5. [Scope, Element and Attributes](http://youtu.be/utKtjxLako4 "Scope, Element and Attributes")
18-
6. [Directive Element Binding](http://youtu.be/7vgvBffpSbs "Directive Element Binding")
19-
7. [Directive to Directive Communication](http://youtu.be/aG8VD0KvUw4 "Directive to Directive Communication")
20-
8. [Directive Restrictions Explained](http://youtu.be/mkEJDWneiPg "Directive Restrictions Explained")
21-
9. [Isolate Scope Part 1](https://www.youtube.com/watch?v=-a4E2eRHHVY "Isolate Scope Part 1")
22-
10. [Isolate Scope Part 2](http://youtu.be/UMoDVY8HAVk "Isolate Scope Part 2")
11+
## Sorting and Filtering Course Videos ##
12+
1. [Services and JSON]( "Services and JSON")
13+
2. [Sorting a List]( "Sorting a List")

src/angular.min.js.map

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

src/angularjstutorial.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* use strict */
2+
var app = angular.module("RavensApp", []);
3+
4+
app.service("ravensService", function ($http, $q)
5+
{
6+
var deferred = $q.defer();
7+
$http.get('resources/json/BaltimoreRavens.json').then(function (data)
8+
{
9+
deferred.resolve(data);
10+
});
11+
12+
this.getPlayers = function ()
13+
{
14+
return deferred.promise;
15+
}
16+
})
17+
18+
.controller("ravensCtrl", function ($scope, ravensService)
19+
{
20+
var promise = ravensService.getPlayers();
21+
promise.then(function (data)
22+
{
23+
$scope.team = data;
24+
console.log($scope.team);
25+
});
26+
})

src/index.html

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
<!doctype html>
22
<html lang="en">
33
<head>
4-
<title>AccioCode AngularJS Tutorial</title>
4+
<title>AccioCode AngularJS Tutorial - Sorting and Filtering and Ng-Repeat</title>
55
<meta charset="utf-8">
66
<meta http-equiv="X-UA-COMPATIBLE" content="IE=edge,chrome=1">
77
<meta name="viewport" content="width=device-width, user-scalable=no">
8-
<script src="resources/js/angularjstutorial-deps.js"></script>
9-
<script src="resources/js/angularjstutorial.js"></script>
8+
<script src="angularjstutorial-deps.js"></script>
9+
<script src="angularjstutorial.js"></script>
1010

11-
<link rel="stylesheet" href="resources/css/angularjstutorial.css">
11+
<link rel="stylesheet" href="angularjstutorial.css">
1212
</head>
1313
<body>
1414

15-
<div class="mainContainer">
16-
<h1>AngularJS Tutorial</h1>
17-
<button class="btn btn-default">Here we go</button>
15+
<div class="mainContainer" data-ng-app="RavensApp">
16+
<h1>Baltimore Ravens</h1>
17+
18+
<div data-ng-controller="ravensCtrl">
19+
20+
</div>
1821
</div>
1922

2023
</body>

src/resources/js/angularjstutorial.js

Whitespace-only changes.

src/resources/js/binding.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/resources/js/ravensService.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* use strict */
2+
var app = angular.module("RavensApp", []);
3+
4+
app.service("ravensService", function ($http, $q)
5+
{
6+
var deferred = $q.defer();
7+
$http.get('resources/json/BaltimoreRavens.json').then(function (data)
8+
{
9+
deferred.resolve(data);
10+
});
11+
12+
this.getPlayers = function ()
13+
{
14+
return deferred.promise;
15+
}
16+
})
17+
18+
.controller("ravensCtrl", function ($scope, ravensService)
19+
{
20+
var promise = ravensService.getPlayers();
21+
promise.then(function (data)
22+
{
23+
$scope.team = data;
24+
console.log($scope.team);
25+
});
26+
})

0 commit comments

Comments
 (0)