+6
-9
lines changedFilter options
+6
-9
lines changed Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
1
1
package example
2
2
3
3
import com.thoughtworks.binding.Binding.Var
4
-
import com.thoughtworks.binding.dom
4
+
import com.thoughtworks.binding.{Binding, dom}
5
5
import org.scalajs.dom.document
6
6
import org.scalajs.dom.ext.Ajax
7
-
import org.scalajs.dom.raw.Event
7
+
import org.scalajs.dom.raw.{Event, HTMLElement}
8
8
9
9
import scala.scalajs.concurrent.JSExecutionContext.Implicits.queue
10
10
import scala.scalajs.js
@@ -14,6 +14,7 @@ import scala.scalajs.js.JSON
14
14
15
15
object ScalaJSExample extends js.JSApp {
16
16
17
+
implicit def makeIntellijHappy(x: scala.xml.Elem): Binding[HTMLElement] = ???
17
18
18
19
/**
19
20
* Ajax Request to server, updates data state with number
@@ -22,8 +23,8 @@ object ScalaJSExample extends js.JSApp {
22
23
*/
23
24
def countRequest(data: Var[String]) = {
24
25
val url = "http://localhost:9000/count"
25
-
Ajax.get(url).onSuccess { case xhr =>
26
-
data := JSON.parse(xhr.responseText).count.toString
26
+
Ajax.get(url).foreach { case xhr =>
27
+
data.value = JSON.parse(xhr.responseText).count.toString
27
28
}
28
29
}
29
30
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ akka {
40
40
# ~~~~~
41
41
# The secret key is used to sign Play's session cookie.
42
42
# This must be changed for production, but we don't recommend you change it in this file.
43
-
play.crypto.secret = "changeme"
43
+
play.http.crypto.secret = "changeme"
44
44
45
45
## Modules
46
46
# https://www.playframework.com/documentation/latest/Modules
@@ -345,7 +345,3 @@ db {
345
345
# https://www.playframework.com/documentation/latest/Highlights25#Logging-SQL-statements
346
346
#default.logSql=true
347
347
}
348
-
349
-
slick.dbs.default.driver="slick.driver.H2Driver$"
350
-
slick.dbs.default.db.driver="org.h2.Driver"
351
-
slick.dbs.default.db.url="jdbc:h2:mem:test"
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4