Check out this custom directive I made:
HTML:
<p-custom-test item="'example'"></p-custom-test>
JavaScript:
.directive('pCustomTest', function() {
return {
scope: {
item: '=?'
},
templateUrl: 'components/customTemplate.html',
controller: 'customController'
};
});
I want to pass 'example' as a string without the '', like this:
<p-custom-test item="example"></p-custom-test>
Even though it's possible via the attributes parameter in link, in this scenario, I'm passing parameters straight to scope.