angularjs custom directive passing string attribute for templateUrl -


i have directive follows , want able pass templateurl in custom directive

<div ng-if="box.key === 'experiences'"     experiences-form    template-url="'experiences.php'" // template url trying pass    item="item"    forms="forms"    form-name="{{box.key}}{{item._id}}"    onsave="updatemultipleuser(box.key, item._id, $data)"    cancel="formaction($formname, 'cancel')"    > </div> 

ddo directive

{     restrict: 'a',     replace: true,     scope: {         onsave: '&',         cancel: '&',         formname: '@',         forms: '=',         item: '='     },     controller: controller,     templateurl: function (telement, tattrs) {         return tattrs.templateurl; // returns 'experiences.php' how rid of single quotes?     } }; 

why putting quotes in templateurl attribute? should work that:

<div ng-if="box.key === 'experiences'"     experiences-form    template-url="experiences.php" // template url trying pass    item="item"    forms="forms"    form-name="{{box.key}}{{item._id}}"    onsave="updatemultipleuser(box.key, item._id, $data)"    cancel="formaction($formname, 'cancel')"    > </div> 

if doesn't work, copy , paste error message or result get?


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -