I have created a custom directive using AngularJS 1.4.3. Below is the code for my directive:
'use strict';
angular.module('psFramework').directive('psFramework', function () {
return {
transclude: true,
scope: {
},
controller: 'psFrameworkController',
templatesUrl: 'ext-modules/psFramework/psFrameworkTemplate.html'
}
});
Below is the code for my controller psFrameworkController
'use strict';
angular.module('psFramework').controller('psFrameworkController',
['$scope',
function ($scope) {
}
]);
The module I am using is called psFrameworkModule
'use strict';
angular.module('psFramework', ['psMenu', 'psDashboard']);
There is also a template file named psFrameworkTemplate.html
, which is very simple:
<h1>Hello</h1>
However, when I add
<ps-framework></ps-framework>
tags to my index.html
file, the template does not render properly.
Here is my index.html
:
<body class="container-fluid">
<ps-framework></ps-framework>
</body>