<button(click)="publish()"...>
{{ smartRotation.approvalRequestUser | smartRotationPublishText }}
</button>
public publish(): void {
RESPONSE:
// ------------- component (template) ---------------- | |
<v-chip id='example-chip' v-show="showChip">Example Chip</v-chip> | |
<v-btn color="info" @click="showChip = true">Click Me</v-btn> | |
// ------------- component (data) ---------------- | |
data: () => ({ | |
showChip: false, | |
name: "mike" |
// EC-3248: POST => spots/v1/ | |
public createSpot(spot: Spot): Observable<string> { | |
const formData: FormData = new FormData(); | |
_.map(spot.filesToUpload, (toUpload: FileToUpload) => formData.append('files', toUpload.file, toUpload.file.name)); | |
formData.append('spot', JSON.stringify(spot)); | |
return this.http.post<string>(`${this._apiRoot}/spots/v1`, formData, { observe: "response"}) | |
.pipe( | |
tap(resp => { console.log(resp.headers); }), | |
map(resp => { | |
const keys = resp.headers.keys(); |
javascript:(function(){ alert('it worked'); })(); |
// Run the BootStrap.groovy script within the Grails Console | |
// http://derekmarley.com/2010/10/27/grails-bootstrap-within-the-grails-console/ | |
new BootStrap().init(ctx.servletContext) | |
// Create toString method | |
// http://groovy.codehaus.org/gapi/groovy/transform/ToString.html | |
@ToString // Annotate class | |
foo.toString() // usage |
// String, need to escape backslashes | |
def bs = '\\\\' | |
// Slashy Strings: /abc/ | |
// String literal not needing additional backslashes to escape special characters. | |
def path = /C:\dev\source/ | |
// G-Strings (double-quotes) |
/* | |
REQUIREMENTS: | |
--------- | |
1) JQuery is required | |
2) Create a element with the id of "console-log" | |
EX: <div id="console-log"></div> | |
USAGE: | |
--------- | |
console.log('hello'); |