build-your-own-angularjs
build-your-own-angularjs copied to clipboard
Source Code & Errata for the "Build Your Own AngularJS" book. http://teropa.info/build-your-own-angular
In page 349, in the case 'accepts expressions for watch functions': ``` it('accepts expressions for watch functions', function() { var theValue; scope.aValue = 42; scope.$watch('aValue', function(newValue, oldValue, scope) { theValue...
P741 registerAndCompile function lives in src/compile_spec.js file not src/compile.js file
Use "We will cover five main areas of functionality" instead of "We will cover four main areas of functionality"
```js var instance = instanceCache[name] = invoke(provider.$get); ``` I think the right code is: ```js var instance = instanceCache[name] = invoke(provider.$get, provider); ```
In the first snippet, the `response.data` line should be highlighted as well.
So you can either change the method name or lock lodash. They love to not follow semver.
Here you say, you now need lodash in http but you needed it at 600 as well.
the unit test "triggers chained watchers in the same digest" thows the error "TypeError: undefined is not an object (evaluating 'newValue.subString')". this is expected because, we are calling .substring(0,1), even...
line 573 expect(parse('fales || false')()).toBe(false);
This piece is not used in the code block and can be removed: ``` var items = [{user: 'Bob'}, {user: {name: 'Bob'}}, {user: {name: {first: 'Bob', last: 'Fox'}}}]; ```