 <p>You can create function like this:</p> <pre><code>function changeTemplate($state, template) { return { scope: { 'resource': '=', 'template': '=' }, template: '&lt;div ng-include="{{template}}"&gt;&lt;/div&gt;', link: function (scope) {.... // cool code } } } </code></pre> <p>And just change template argument on parent scope.</p>