Ex.5 creating new directives, 5, installApp 1 angular.js

I cant manage to create the installApp directive, Im pretty sure my problem is in the restrict section,
can anyone tell me what do I do wrong??

app.directive(‘installApp’, function(){
return {
restrict: {},
scope: {},
templateUrl: 'js/directives/installApp.html ’
};
});

I believe the value for restrict should be ‘E’ instead of the brackets.

restrict: 'E',

I had several problems here. After trying several things will I ran this code:

app.directive('installApp', function() {
  return {
    restrict: 'E',
    scope: {},
    templateUrl: 'js/directives/installApp.html'
    }
});
1 Like

m facing the same issue not able to proceed further

app.directive(‘installApp’,function(){
return{
restrict : ‘E’,
$scope: {},
templateURL:‘js/directives/installApp.html’
};
});
please help me

You are missing the --> info: “=” <-- inside the scope. Your code should look like this:

app.directive(‘installApp’, function(){
return {
restrict: ‘E’,
scope: {
info: ‘=’
},
templateUrl: ‘js/directives/installApp.html’
};
});

Give ‘E’ value to restrict. Your code will look like following:

app.directive(‘installApp’,function(){
return {
restirct : ‘E’,
scope : { },
templateUrl : ‘js/directives/installApp.html’,
};
});