摘要:
var el = document.createElement('pre'); // 创建 元素 el.id = 'sss'; // 添加id document.body.appendChild(el); // 把它 加入到body的底部去 el = document.getElementById('sss'); // 访问dom 根据id得到... 阅读全文
posted @ 2016-08-25 18:21
wifix
阅读(840)
评论(0)
推荐(0)
摘要:
angular里的service是一个单例对象,在应用生命周期结束的时候(关闭浏览器)才会被清除。而controllers在不需要的时候就会被销毁了。 factory是angular里的一种service. Angular里面创建service最简单的方式是使用factory()方法。 例子 什么时 阅读全文
posted @ 2016-08-25 15:09
wifix
阅读(8367)
评论(0)
推荐(2)

浙公网安备 33010602011771号