Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var app = angular.module('plunker', []);
- app.controller('MainCtrl', function($scope) {
- });
- app.directive('myDirective', function(){
- return {
- priority: 1000,
- compile: function(element){
- angular.element(element).removeAttr('ng-if').removeAttr('my-directive1');
- }
- };
- });
- app.directive('myDirective1', function(){
- return {
- compile: function(){
- console.log('in mydirective1');
- }
- };
- });
- <div my-directive ng-if="false" my-directive1>
- This div should be visible.
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement