Skip to content

Commit

Permalink
chore(example): upgrade to AngularJS 1.3.0-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellmb committed Mar 10, 2014
1 parent d15dac2 commit 8cd4856
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 16 deletions.
2 changes: 1 addition & 1 deletion example/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = function (grunt) {
// http://en.wikipedia.org/wiki/Cyclomatic_complexity
cyclomatic: 8,
// http://en.wikipedia.org/wiki/Halstead_complexity_measures
halstead: 8,
halstead: 9,
maintainability: 100
}
}
Expand Down
9 changes: 5 additions & 4 deletions example/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"name": "myExample",
"version": "0.0.0",
"dependencies": {
"angular": "~1.0.8",
"angular-sanitize": "~1.0.8"
"angular": "~1.3.0-beta.1",
"angular-route": "~1.3.0-beta.1",
"angular-sanitize": "~1.3.0-beta.1"
},
"devDependencies": {
"angular-mocks": "~1.0.8",
"angular-scenario": "~1.0.8"
"angular-mocks": "~1.3.0-beta.1",
"angular-scenario": "~1.3.0-beta.1"
}
}
1 change: 1 addition & 0 deletions example/coffeescript/app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Declare module dependencies and routes, then create and configure the app.

# Declare module dependencies
dependencies = [
'ngRoute'
'ngSanitize'
]

Expand Down
1 change: 1 addition & 0 deletions example/coffeescript/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ <h1>{ CoffeeScript Example }</h1>
<!-- angular -->
<script src="../bower_components/angular/angular.js"></script>
<!-- dependencies -->
<script src="../bower_components/angular-route/angular-route.js"></script>
<script src="../bower_components/angular-sanitize/angular-sanitize.js"></script>
<!-- application code -->
<script src="app.coffee" type="text/coffeescript"></script>
Expand Down
11 changes: 6 additions & 5 deletions example/coffeescript/karma.conf.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ module.exports = (config) ->
# list of files / patterns to load in the browser
files: [
# app deps
'../bower_components/angular/angular.js',
'../bower_components/angular-mocks/angular-mocks.js',
'../bower_components/angular-sanitize/angular-sanitize.js',
'../bower_components/angular/angular.js'
'../bower_components/angular-route/angular-route.js'
'../bower_components/angular-mocks/angular-mocks.js'
'../bower_components/angular-sanitize/angular-sanitize.js'
# app code
'app.coffee',
'app.coffee'
# mocks
'mock.coffee',
'mock.coffee'
# generated specs to run
'spec.coffee'
]
Expand Down
1 change: 1 addition & 0 deletions example/javascript/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Declare module dependencies and routes, then create and configure the app.

// Declare module dependencies
var dependencies = [
'ngRoute',
'ngSanitize'
];

Expand Down
1 change: 1 addition & 0 deletions example/javascript/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ <h1>{ JavaScript Example }</h1>
<!-- angular -->
<script src="../bower_components/angular/angular.js"></script>
<!-- dependencies -->
<script src="../bower_components/angular-route/angular-route.js"></script>
<script src="../bower_components/angular-sanitize/angular-sanitize.js"></script>
<!-- application code -->
<script src="app.js"></script>
Expand Down
1 change: 1 addition & 0 deletions example/javascript/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = function (config) {
files: [
// app deps
'../bower_components/angular/angular.js',
'../bower_components/angular-route/angular-route.js',
'../bower_components/angular-mocks/angular-mocks.js',
'../bower_components/angular-sanitize/angular-sanitize.js',
// app code
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"protractor": "~0.9.0"
},
"engines": {
"node": ">=0.8.0"
"node": ">=0.10"
}
}
6 changes: 3 additions & 3 deletions example/views/home.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p>this is the home page.</p>
<my-dir></my-dir>
<div my-dir="foo"></div>
<div class="my-dir"></div>
<my-dir ng-model="foo"></my-dir>
<div my-dir="foo" ng-model="bar"></div>
<div class="my-dir" ng-model="baz"></div>
8 changes: 6 additions & 2 deletions patterns/directive.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ describe('Directive: myDir', function () {
it 'should throw error when ngModel attribute not defined', ->
invalidTemplate = ->
createDirective null, '<my-dir></my-dir>'
expect(invalidTemplate).toThrow new Error('No controller: ngModel')
# Note: older versions of Angular throw this error as: 'No controller: ngModel'
# More recently it is: Controller 'ngModel', required by directive 'myDir', can't be found!
expect(invalidTemplate).toThrow()
```

```JavaScript
Expand All @@ -136,7 +138,9 @@ it('should throw error when ngModel attribute not defined', function () {
function invalidTemplate() {
createDirective(null, '<my-dir></my-dir>');
}
expect(invalidTemplate).toThrow(new Error('No controller: ngModel'));
// Note: older versions of Angular throw this error as: 'No controller: ngModel'
// More recently it is: Controller 'ngModel', required by directive 'myDir', can't be found!
expect(invalidTemplate).toThrow();
});
```

Expand Down

0 comments on commit 8cd4856

Please sign in to comment.