Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- angular.module('myModule')
- .directive('roar', function() {
- return {
- restrict: 'E',
- scope: {},
- controller: roarCtrl,
- controllerAs: dinoRoar,
- bindToController: {
- dinoType: '@'
- }
- template: '<p>I am a {{ dinoRoar.getType }}, hear me ROAR!</p>',
- };
- function roarCtrl() {
- this.getType = function() {
- return this.dino.species;
- };
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement