wonderfan / javascript

Explore the power of HTML,CSS and JavaScript
1 stars 0 forks source link

在ionic中使用spinner #79

Closed wonderfan closed 8 years ago

wonderfan commented 8 years ago

在directive的定义上,link函数调用了controller对象的init方法,将返回值作为classname添加到元素上。

wonderfan commented 8 years ago

在controller的定义中,依赖了element,attrs 和config,从attrs上检查是否配置了spinner icon,没有的话,就取config对象中的默认值。

在controller,动态的创建svg元素,把它作为内容放置在element内。