angularjs - Is it possible to set ng-view to replace: true? -
i'm integrating angular web application , noticed wrapper messing of css on page. after researching directives, saw custom directives can have property called 'replace' set true templateurl directly replaces instead of being wrapped in directive's tags.
is there way same ng-view, or more angular directive? help!
i think best bet decorate original ng-view
directive , add replace:true
switch it. note, replace going - hah - replaced in next major version of angularjs, now, work:
app.config(function($provide) { $provide.decorator('ngviewdirective', function($delegate) { var directive = $delegate[0]; directive.replace = true; return $delegate; }); });
and of course, jsfiddle: here
Comments
Post a Comment