angular-programming / angular2-questionnaire Goto Github PK
View Code? Open in Web Editor NEWAngular Programming Book Part 3 Demo
Angular Programming Book Part 3 Demo
questionnaire.service.ts中http.post的地址是http://localhost:5000端口,而页面是5555端口,这不是存在同源策略问题?
ng2-bootstrap.umd.min.js?1488201334751:5680 Uncaught Error: Module must be loaded as AMD or CommonJS
## Uncaught Error: Module must be loaded as AMD or CommonJS
at ng2-bootstrap.umd.min.js:5680
at ng2-bootstrap.umd.min.js:1
at ng2-bootstrap.umd.min.js:5674
ReferenceError: exports is not defined
at eval (http://localhost:5555/app/shared/models/question.model.js:2:23)
at eval (<anonymous>)
at Object.eval (http://localhost:5555/app/shared/models/index.js:6:10)
at eval (http://localhost:5555/app/shared/models/index.js:11:4)
Evaluating http://localhost:5555/app/shared/models/question.model.js
Evaluating http://localhost:5555/app/shared/models/index.js
Evaluating http://localhost:5555/app/shared/index.js
Evaluating http://localhost:5555/app/app.component.js
Evaluating http://localhost:5555/app/app.module.js
Evaluating http://localhost:5555/app/main.js
Error loading http://localhost:5555/app/main.js Not expecting this error? Report it at https://github.com/mgechev/angular-seed/issues
请教一下这是什么原因导致的,该怎么解决啊
angular2 是否适合开发移动端页面呢?如果可以,用那个UI框架好呢?可否推荐下?
getQuestionnaireById(id: string) {
return this.http.get(SITE_HOST_URL + 'questionnaire/' + id)
.map(res => res.json().data)
.catch(this.handleError);
}
刷新页面后需要重新登录,这是否是设计上的缺陷?
请问老师我把后端和前端的代码都运行起来了 之后在浏览器上观察 发现 注册和登录 功能 都不能达到效果 请问老师解决的方法是什么呢
return new Observable((observer: Observer) => {
this.http.get(this.getUserInfoUrl(CONTACT_URL))
.map(res => res.json().data)
.subscribe(res=>{
observer.next(res);
observer.complete();
});
});
轮播插件好像不能自动跳转。。。
老师您好,我想问下为何github上的代码跟书本上讲解时说得代码不一致?
例如:P438-P439 --shared/questionnaire/questionnaire.component.ts中的onSubmit代码以及书上说在QuestionnaireModule模块中引入了ng2-bootstrap的AlterModule。
再如:P441页用到的this.questionnaireService.updateQuestionnaireState方法跟存在和服务中定义的不一致的情况
github上代码
ngOnChanges(changes: SimpleChanges){
let questionnaireChange = changes['questionnaire'];
if(questionnaireChange.previousValue.state &&
questionnaireChange.currentValue.state !== questionnaireChange.previousValue.state){
this.questionnaire = changes['questionnaire'].currentValue;
this.setState();
}
}
官网PAI
class SimpleChange {
constructor(previousValue: any, currentValue: any, firstChange: boolean)
previousValue : any
currentValue : any
firstChange : boolean
isFirstChange() : boolean
}
通过changes为SimpleChanges的一个对象实例,那么应该不具有questionnaire方法吧?表示那不大理解,像老师请教一下。
原代码: const storage = require('lowdb/file-async');
我修改为: lowdb/lib/storages/file-async
就好了.
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.