Skip to content

Instantly share code, notes, and snippets.

@simon-lang
Created August 5, 2020 01:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simon-lang/1fbb20b684a71510d3f2adee974825fb to your computer and use it in GitHub Desktop.
Save simon-lang/1fbb20b684a71510d3f2adee974825fb to your computer and use it in GitHub Desktop.
VSCode HTML Snippets
{
"bind": {
"prefix": "bind",
"body": [
"{{$1}}"
],
"description": ""
},
"message": {
"prefix": "message",
"body": [
"{{::'$1' | message}}"
],
"description": ""
},
"form": {
"prefix": "form",
"body": [
"<form ng-submit=\"$1\">",
" $0",
"</form>"
],
"description": ""
},
"checkbox": {
"prefix": "checkbox",
"body": [
"<label class=\"checkbox\">",
" <input type=\"checkbox\" ng-model=\"$1\">",
" <i></i>",
" $2",
"</label>"
],
"description": ""
},
"tristate": {
"prefix": "tristate",
"body": [
"<label class=\"checkbox tri-state-checkbox\">",
" <input type=\"checkbox\" lens-tristate-checkbox model=\"$1\">",
" <i></i>",
" $2",
"</label>"
],
"description": ""
},
"input": {
"prefix": "input",
"body": [
"<label class=\"input\">",
" <input ng-model=\"$1\">",
"</label>"
],
"description": ""
},
"select": {
"prefix": "select",
"body": [
"<label class=\"select\">",
" <select ng-model=\"$1\" ng-options=\"$2\"></select>",
" <i></i>"
"</label>"
]
},
"repeat": {
"prefix": "repeat",
"body": [
"<div ng-repeat=\"$1\">",
" $2"
"</div>"
]
},
"dropdown": {
"prefix": "dropdown",
"body": [
"<label class=\"select\">",
" <select ng-model=\"$1\"></select>",
" <i></i>"
"</label>"
]
},
"link": {
"prefix": "link",
"body": [
"<a ui-sref=\"$1\">$2</a>"
]
},
"btn": {
"prefix": "btn",
"body": [
"<a class=\"btn$1\" ng-click=\"$2\">$3</a>"
]
},
"modal": {
"prefix": "modal",
"body": [
"<div lens-modal visible=\"$ctrl.state.$1\">",
" <h3 class=\"modal-heading\">$2</h3>",
" <div>$3</div>",
" <div>",
" <span ng-click=\"close()\" class=\"btn\">Cancel</span>",
" <button ng-click=\"\" class=\"btn btn-pri\">Submit</button>",
" </div>",
"</div>",
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment