Skip to content

Instantly share code, notes, and snippets.

@perploug
Last active August 15, 2017 09:57
Show Gist options
  • Save perploug/cf37ef0aad65f0d3baf8868d55ce0fc4 to your computer and use it in GitHub Desktop.
Save perploug/cf37ef0aad65f0d3baf8868d55ce0fc4 to your computer and use it in GitHub Desktop.
Twitter Username
<div class="twitter-username thumbnail" style="width: 220px">
<!-- here we display the updated value using ng-src to display it as part of a image pulled from twitter - by default it pulls the image from the twitter account -->
<img ng-src="https://twitter.com/{{model.value || 'Twitter'}}/profile_image?size=original" class="img-circle">
<!-- this is where we input our username and bind it to the value of the field -->
<input type="text" placeholder="Username" ng-model="model.value">
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment