B
B
BonBon Slick2017-10-10 14:53:03
Vue.js
BonBon Slick, 2017-10-10 14:53:03

Does Vue.js break variables if you put them in href="" or action=""?

<h1>{{ routeLogIn }}</h1> // работает
  <form class="form-horizontal" role="form" method="POST" action="{{ routeLogIn }}"> // весь файл  ломает 
    <a href="{{ routeHome }}"  // то же самое

//scripts
     data() {
            return {
                routeLogIn: laroute.url('login', []),
            }
        },

Writes a hint to PhPStrom saying:
Cannot resolve file
If at least one line is not working, the entire component will not be displayed.
Why is that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Koch, 2017-10-10
@BonBonSlick

Because you need to use v-bind in attributes.
:href="routeHome"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question