Open sidebar
function Directive($state) { return { restrict: 'E', replace: true, templateUrl: 'partials/hero/template.html', link: Link }; function Link(scope) { scope.hero = { title: 'This is a test', swatch: 'red-1' }; if ($state.$current.name !== '') { updateHero(); } scope.$on('$stateChangeSuccess', updateHero); function updateHero() { var currentState = $state.$current; scope.hero = { title: currentState.data.title, swatch: currentState.data.swatch }; } } }
Close sidebar
Back
Please note that all pasted data is publicly available.
X (fomerly Twitter)
GitHub
Use setting
Back
Please note that all pasted data is publicly available.
X (fomerly Twitter)
GitHub
Use setting