Skip to content

Commit 76a6784

Browse files
author
K.C. Hunter
committed
Adding video 4 files
1 parent d1700db commit 76a6784

4 files changed

Lines changed: 24 additions & 5 deletions

File tree

GruntFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = function (grunt)
77
separator: "\n\n"
88
},
99
dist: {
10-
src: [],
10+
src: ['src/resources/js/MyApp.js'],
1111
dest: 'src/resources/js/<%= pkg.name %>.js'
1212
},
1313
deps: {

src/index.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!doctype html>
22
<html lang="en">
33
<head>
4-
<title>AccioCode AngularJS Tutorial</title>
4+
<title>AccioCode AngularJS Tutorial - Directives</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">
@@ -12,9 +12,8 @@
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="MyApp">
16+
<walterwhite></walterwhite>
1817
</div>
1918

2019
</body>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* use strict */
2+
var app = angular.module('MyApp', []);
3+
app.directive('walterwhite', function ()
4+
{
5+
return {
6+
restrict: 'E',
7+
transclude: true,
8+
template: '<h2>I am Heisenberg</h2>'
9+
}
10+
});

src/resources/js/myApp.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* use strict */
2+
var app = angular.module('MyApp', []);
3+
app.directive('walterwhite', function ()
4+
{
5+
return {
6+
restrict: 'E',
7+
transclude: true,
8+
template: '<h2>I am Heisenberg</h2>'
9+
}
10+
});

0 commit comments

Comments
 (0)