Last active
September 12, 2016 15:02
-
-
Save rbinsztock/e3173aaa23e52e32cd3efd10fac689eb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fooTemplate from './foo.html'; | |
import barTemplate from './bar.html'; | |
app.directive('dyntemplate', function() { | |
return { | |
templateUrl: function(elem, attrs) { | |
if (attrs.templateUrl === 'foo.html') { | |
return fooTemplate; | |
} | |
return barTemplate; | |
} | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment