How to add templateUrl for custom dashboard directive?
Hi All,
I have created custom plugin in v8 for the custom dashboard and which is working fine. Now, I have create directive and use into the plugin which I had created. If I define inline template in directive then it works fine. But the problem is that when I define my template in a separate html file and add the file path in templateUrl so I am getting 404. In package.manifest, how to add the directive template url "section-create.directive.html"?
Umbraco needs the javascript content defined in package.manifest to inject these references in the main HTML file, like index.html. So, you have to consider this location to make your import in the directive/component, not the relative location (current location of your JS file). To solve this easily, the path to the Application folder can be found stored in a Umbraco's variable. The variable is:
How to add templateUrl for custom dashboard directive?
Hi All,
I have created custom plugin in v8 for the custom dashboard and which is working fine. Now, I have create directive and use into the plugin which I had created. If I define inline template in directive then it works fine. But the problem is that when I define my template in a separate html file and add the file path in templateUrl so I am getting 404. In package.manifest, how to add the directive template url "section-create.directive.html"?
Hi, thanks for you post in the forum!
Umbraco needs the javascript content defined in package.manifest to inject these references in the main HTML file, like index.html. So, you have to consider this location to make your import in the directive/component, not the relative location (current location of your JS file). To solve this easily, the path to the Application folder can be found stored in a Umbraco's variable. The variable is:
From this location, you can access the App_Plugins folder and find your template HTML file. For example:
I hope this will help you. Thanks!
is working on a reply...