Ale.js

Other functions

isHasThisComponent

The Ale.isHasThisComponent function is used to get whether a component is globally registered (returning the bool value) [receive a parameter as the component name]:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Ale("test", {
template: function(){
return this.data.isReg;
},
data: {
isReg: false
}
})

var app = Ale.render("test", {
el: "#app"
})

app.data.isReg = Ale.isHasThisComponent("test");

Found some errors? Edit on Github!