Recently delving into Angularjs, I've embarked on creating a directive.
Here's a snippet from my js file:
var app = angular.module('myCars',['ngResource']);
app.controller('CarController', function (Post) {
var b = Post.query(function () {
console.log(all);
});
this.cars = b;
});
app.directive("carCritics", function () {
return {
restrict: 'E',
templateUrl: '~/Views/Home/car-critics.cshtml'
};
});
And here's how it's structured in my cshtml file:
<car-critics></car-critics>
Despite researching various resources on directives, I'm still unable to figure out why the part in my directive isn't displaying when I launch the application. Any assistance would be greatly appreciated.