Replace default HTML tag with VUE component

Multi tool use
up vote
0
down vote
favorite
I need to replace all h1
tags on my site with custom ones but i cant handle it:
Vue.component('h1', {
template: '<div>REPLACED</div>'
})
new Vue({ el: 'vue' })
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<vue>
<h1>
lalalala
</h1>
</vue>
Can i place my component on top of HTML tag?
vue.js
add a comment |
up vote
0
down vote
favorite
I need to replace all h1
tags on my site with custom ones but i cant handle it:
Vue.component('h1', {
template: '<div>REPLACED</div>'
})
new Vue({ el: 'vue' })
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<vue>
<h1>
lalalala
</h1>
</vue>
Can i place my component on top of HTML tag?
vue.js
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I need to replace all h1
tags on my site with custom ones but i cant handle it:
Vue.component('h1', {
template: '<div>REPLACED</div>'
})
new Vue({ el: 'vue' })
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<vue>
<h1>
lalalala
</h1>
</vue>
Can i place my component on top of HTML tag?
vue.js
I need to replace all h1
tags on my site with custom ones but i cant handle it:
Vue.component('h1', {
template: '<div>REPLACED</div>'
})
new Vue({ el: 'vue' })
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<vue>
<h1>
lalalala
</h1>
</vue>
Can i place my component on top of HTML tag?
Vue.component('h1', {
template: '<div>REPLACED</div>'
})
new Vue({ el: 'vue' })
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<vue>
<h1>
lalalala
</h1>
</vue>
Vue.component('h1', {
template: '<div>REPLACED</div>'
})
new Vue({ el: 'vue' })
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<vue>
<h1>
lalalala
</h1>
</vue>
vue.js
vue.js
asked 2 days ago


Diskyp
1166
1166
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
draft saved
draft discarded
draft saved
draft discarded
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53184035%2freplace-default-html-tag-with-vue-component%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
aCO ID1