ng-nice / book Goto Github PK
View Code? Open in Web Editor NEW读者反馈与勘误:对本书的反馈请提issue
读者反馈与勘误:对本书的反馈请提issue
不建议用sudo 权限安装npm包。如果项目中用了工作流, 用sudo装的包也只能sudo跑任务, 而root身份去取process中的环境变量可能会发生意想不到的结果
书中提到可以使用 $location.has('name') $anchorScorll() 方法实现锚点定位问题 但是在SPA页面中点击浏览器的回退是返回上一个锚点的位置 如何返回上一页面呢
错误的
<ul ng-if="vm.$hasChildren()">
正确应该是
<ul ng-if="vm.items">
因为controller里面没有绑定$hasChildren()方法,只有在service里面有定义这个方法。
安装fj并create项目,按照20页的步骤修改router.js后,访问页面控制台报错:
Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
TypeError: $urlRouterProvider.state is not a function
at http://localhost:5000/configs/router.js:27:22
查了下ui router的api
,没有state这个方法。查看官网的sampleapp里也都是用$stateProvider进行路由定义,把router.js里所有$urlRouterProvider.state()改成$statProvider.state()后就不再报错。
书籍208页勘误: ng-bing 改为 ng-bind
p24描述github可下载“BookForumApi.zip”,实际在ngnice项目中找不到这个release。
把项目整体clone到本地后,没找到启动脚本,发现还要配置grails、groovy,并且默认端口是8080而不是书上写的5080。
此外,按照p37页方法配置图形验证码请求地址的话,服务端返回“401 Unauthorized” ,response body中信息有“This request requires HTTP authentication.”
p12页第一行cpnm 应为cnpm
{{item.dateCreated : date:'yyyy-MM-dd HH:mm'}} 应该是{{item.dateCreated | date:'yyyy-MM-dd HH:mm'}}
P10页23行的冒号(:)应该修改为顿号(、)
angular.module('com.ngnice.app').controller('demoService',function(){});
这里是否应该将demoService定义为service?
指令代码中最后的
ngModel.$setValidity('same',isSame(ngModel.$modelValue))
应该改为isSame(ngModel.$viewValue);
校验失败的时候modelValue为 undefined,用它校验会有问题。
使用fj创建了服务,是不是fj升级了,现在module是 app 而不是 com.ng-nice.app了。而且服务只能访问home页,连 noFound页面都访问不了。
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.