Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ng-init directive priority #5167

@bullgare

Description

@bullgare

Hello.
There's one more priority-related bug in 1.2.
1.2.2 is now ok when using controller on ng-include but there's one more related bug:
ng-init doesn't affect ng-include.
It can be fixed with setting it's priority higher than in include directive, like:

var ngInitDirective = ngDirective({
  priority: 401,
  compile: function() {
    return {
      pre: function(scope, element, attrs) {
        scope.$eval(attrs.ngInit);
      }
    };
  }
});

Jsbins:
with 1.2.2 - http://jsbin.com/oliGUvud/1/edit?html,output (digit 1 is not there)
with 1.0.8 - http://jsbin.com/EfudOZAF/1/edit?html,output (digit 1 is there)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions