Skip to content

Commit ca49860

Browse files
committed
Merge gruntfile
2 parents 0b83940 + 42b8680 commit ca49860

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,19 @@ To evolve the concept of an Angular "Route" into a more general concept of a "St
2424
* [Generated Docs](http://angular-ui.github.com/ui-router/build/doc/)
2525
* Latest build: [angular-ui-states.min.js](http://angular-ui.github.com/ui-router/build/angular-ui-states.min.js)
2626
(uncompressed [angular-ui-states.js](http://angular-ui.github.com/ui-router/build/angular-ui-states.js))
27+
28+
# Developing
29+
30+
Dependencies for building the solution and running tests:
31+
32+
* [karma](http://karma-runner.github.com/) - run: `$ npm install -g karma`
33+
* [grunt-cli](https://github.com/gruntjs/grunt-cli) - run: `$ npm install -g grunt-cli`
34+
* Then install development dependencies with: `$ npm install`
35+
36+
There is a number of targets in the gruntfile that is used to building the solution, documents etc.
37+
38+
* `grunt`: Perform a normal build, runs jshint and karma tests
39+
* `grunt build`: Perform a normal build
40+
* `grunt dist`: Perform a clean build and generate documentation
41+
* `grunt dev`: Run dev server and watch for changes, builds and runs karma tests on changes.
42+

src/viewDirective.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,8 @@ function $ViewDirective( $state, $compile, $controller, $anchorScroll) {
4040
viewScope = scope.$new();
4141
if (locals.$$controller) {
4242
locals.$scope = viewScope;
43-
// This is a 'directive controller'. need to allow element and attr injections (TBD: transcludeFn)
44-
locals.$element = element;
45-
locals.$attrs = attr;
46-
//store directive controller with distinct name on the element.data as per angular.js convention
4743
var controller = $controller(locals.$$controller, locals);
48-
element.data('$' + name+'Controller', controller);
44+
element.contents().data('$ngControllerController', controller);
4945
}
5046
link(viewScope);
5147
viewScope.$emit('$viewContentLoaded');

0 commit comments

Comments
 (0)