angular-cn / ng-showcase Goto Github PK
View Code? Open in Web Editor NEWAngular指令及组件的全面范例
Home Page: ngnice.com/showcase/
Angular指令及组件的全面范例
Home Page: ngnice.com/showcase/
现在依靠规约寻找css,期望的逻辑是:如果文件不存在,则不显示css页。但是现在对于不存在的页,服务器会返回200,并且内容是首页内容。
请配置下,如果文件不存在则返回404错误。
输入框中可以直接输入负数的百分比或者是超过100%的百分比
使用基本select配合ng的ng-options指令,演示select的用法。
将HTML,js,css放在不同的页标签中同时展示。同样遵循规约来定义css文件。
演示html5标准编辑框及其简单变体
如题,想知道这只是习惯问题,还是有什么隐藏属性?
如果把css嵌入到html代码中,就会导致html内容过长,不利于别人从中拷贝。
$ grunt serve
Running "serve" task
Running "clean:server" (clean) task
Running "bowerInstall:app" (bowerInstall) task
Cannot find where you keep your Bower packages.
We tried looking for a .bowerrc
file, but couldn't find a custom
directory
property defined. We then tried bower_components
, but
it looks like that doesn't exist either. As a last resort, we tried
the pre-1.0 components
directory, but that also couldn't be found.
Unfortunately, we can't proceed without knowing where the Bower
packages you have installed are.
Fatal error: No Bower components found.
Execution Time (2016-12-13 08:11:43 UTC)
loading tasks 4ms ■■■■■■■■■■ 21%
serve 2ms ■■■■■ 11%
clean:server 4ms ■■■■■■■■■■ 21%
bowerInstall:app 8ms ■■■■■■■■■■■■■■■■■■■ 42%
Total 19ms
demo:http://codepen.io/hzxs1990225/pen/VYyOdW
repository:https://github.com/amibug/angular-sku
完善一下代码,能整合到例子中么
可以让读者参与互动, 包括点评或答疑
在http://www.ngnice.com/showcase/#/tree/checkbox 页面的demo中,第一次点选三级选项中的“海淀区”时,二级选项“北京”前面的checkbox是全选而非半选状态,但是点选了其他选项再取消又正常了。
使用基本指令实现多级级联下拉框。
类似于ztree插件的级联选择功能:
让导航菜单可以折叠/展开,并且能够根据关键字、view内容进行搜索。
介绍如何用pure_funcs去除特定函数,如console.log,以及如何用global_defs实现条件编译
_.each _.where 这些对象在哪里定义的?
另, 考虑下增加github的star标识?
实现TreeData模块,封装树形控件的级联操作功能。
树级联选择 的bug 看截图:
当check加利福尼亚州这个节点时,美国这个节点会全选,应该半选吧!
本人在ng实际开发中后台应用到了echarts, 因为未和ng整合, 在spa应用中使用 include-view的标签切换的时候会丢失dom, 表格会消失。 提个issue 挂这里
非常喜欢ng-showcase,作为入门型的angular元素集,安装却并不简单,特别是对于城墙厚重的**码农来说。
建议:在项目中直接包含所需要的所有组件,不用npm install 和 npm bower的方式。
另外,项目启动建议直接html打开,不用grunt server
利用bootstrap的nav-tab,配合ng指令实现多标签页控件,并且实现与panel的联动。
如灰底色
file-upload控件作者提供解决方案
解决方案
vm.uploader = $fileUploader.create({
scope: $scope,
url: '../rest/news',
//autoUpload: true, // 自动开始上传
autoUpload: false, // 自动开始上传
formData: [
],
filters: [ // 过滤器,可以对每个文件进行处理
function (item) {
console.info('filter1', item);
return true;
}
]
});
vm.uploader.bind('beforeupload', function (event, item) {
item.formData.push({title: vm.news.title});
item.formData.push({content: vm.news.content});
item.formData.push({intro: vm.news.intro});
});
单选框和勾选框感觉还比较单调,如果能够加入CSS3样式来实现单选框和勾选框的话,应该更能满足样式上的效果了,哈哈~
结合thumbnail列表和table,实现基本购物车功能,可以加减数量,并随时计算总价。
猜测:checkbox会更改city.checked,然后tr上的ng-click再次更改了checked的状态
直接使用内置指令配合bootstrap实现进度条控件,能够带文字并且演示出动态配置进度条风格的方法。
演示可折叠的panel,并且通过点击图标来切换折叠状态。
➜ ng-showcase git:(master) npm -version
1.3.2
➜ ng-showcase git:(master) nvm ls
system
default -> 0.10.40 (-> v0.10.40)
能够折叠/展开,能够带图标,能够响应点击事件。
在SPA中使用angula-ui-router的路由问题:
1)业务描述:
打算把微信服务号的部分页面用SPA模式重构下;
2)目前问题:
A:因为只是要把部分页面重构为SPA,所以就涉及到这个SPA的root或者说base href(应该是锚点)怎么定?
B:其实重构的主要是把原来的a标签中的链接,换成ui-sref的形式;原来我的a标签是一个从后台传过来的具体的URL(http://rostname/wx/consultant/home/p/QzkwODVGWWlTRms9/oeOGnuEEc4g5bj2wMaSRJxjx9b_k/939b888800bf4797ba5583dd7aba2463bffcd4c8/0/),
那么现在我该怎么设置这个ui-sref?
怎么设置$stateProvider.state中的各个值;url,templateUrl等。
我把showcase里面的代码单独拿出来放到我自己的页面里面,发现不能运行,需要给angular.module传入第二个参数如angular.module('ngShowcaseSelect',[]),而网站上写的是angular.module('ngShowcaseSelect'),不知道是我的angular的版本和网站的不一致,还是网站上的代码有误
/images/xx.jpg路径会指向根目录,导致在非根目录下部署时,图片加载失败,应该改为./images或者images/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.