Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

121
Visualizações
Angular2 for clojurescript

I would like to build an application with clojurescript language and angular2 framework.

I've found this project on github which provided a basic exmaple of combining these two. But this is just a basic start, I've had difficulty with declaring new components and adding more of angular2 features into my app.

Are there any tutorials on this issue? Have you tried working with both clojurescipt and angular2?

Thanks for your help

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

While this is possible to do, you are going to be going quite far off the beaten path. Angular relies heavily on annotations, dependency injection, and Javascript features which is not going to be a great fit for ClojureScript.

Writing Angular like the sample below is going to be very annoying and error-prone:

(let [app (get-app)
      c (.Component (.-core js/ng)
                    #js {:selector "my-app"
                         :template (html [:div
                                          [:h1 " Demo"]
                                          [:div [:h2 "Hero List:"]]
                                          "
<input #newHero (keyup.enter)=\"addHero(newHero.value); newHero.value='' \" >
<button (click)=\"addHero(newHero.value); newHero.value='' \">Add</button>
<ul><li *ngFor=\"#hero of heroes()\">{{hero}}</li></ul>
"
                                          ])})

If you go down this path, you will mostly end up writing JavaScript in a funny DSL (ClojureScript).

It's probably worth stepping back and asking why you want to use both Angular and ClojureScript? They both have quite distinct philosophies and styles. If you are wanting to use ClojureScript, then there are several good ClojureScript frameworks for building SPA's like Om, re-frame, and rum that take advantage of ClojureScript's strengths like immutable data and functional programming.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda