I
I
Igor Pushkarsky2015-10-22 09:50:04
Angular
Igor Pushkarsky, 2015-10-22 09:50:04

How to connect in Jade to use AngularJS?

In general, the problem is understandable at first glance, but I can’t find how to solve even in Google
. The bottom line is that I set up the gulp + browser sync project to work with jade / stylus in the project, you need to use angular.
With directives, everything seems to be clear and simple
html(ng-app="detboxAdminApp")
, but how to deal with

input(type='text', ng-model="word")
                            {{world}}

jade swears at them and the syntax is not highlighted.
I work in PHPStorm.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2015-10-22
@RainMEN

input(type='text', ng-model="word")
| {{world}}

bindings must be arranged as the content of the elements. Well, yes, input cannot have nested elements, and from your code it turns out that you want it this way.

D
Dmitry Gusev, 2015-10-22
@illi

try like this:

input(type='text', ng-model="word")
                            | {{world}}

or
input(type='text', ng-model="word").
                            {{world}}

or
input(type='text', ng-model="word")
                            ="{{world}}"

but in general this is an input, there you need to write in value
input(type='text', ng-model="word", value="{{world}}")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question