ng-book / angular2-redux-chat Goto Github PK
View Code? Open in Web Editor NEWAn introduction to using pure Redux in TypeScript with Angular 2
An introduction to using pure Redux in TypeScript with Angular 2
Changing from angular/cli:"1.2.0-beta.1" to angular/cli:"^1.4.9"
and running
ng build --prod
causes the following output:
WARNING in ./src/app/app.component.ts
10:64-75 "export 'Store' (imported as 'Redux') was not found in 'redux'
WARNING in ./src/app/chat-nav-bar/chat-nav-bar.component.ts
15:71-82 "export 'Store' (imported as 'Redux') was not found in 'redux'
WARNING in ./src/app/chat-threads/chat-threads.component.ts
24:72-83 "export 'Store' (imported as 'Redux') was not found in 'redux'
WARNING in ./src/app/chat-window/chat-window.component.ts
40:71-82 "export 'Store' (imported as 'Redux') was not found in 'redux'
ERROR in ng:///path/to/Project/angular2-redux-chat-master/src/app/chat-message/chat-message.component.html (12,8): Property 'sender' does not exist on type 'Message'.
on ng build or npm start everthing works fine.
Why is the reference changing in production / can't be resolved?
I also noticed that all import * as Redux from 'redux'; 'warned' except for the import in app.store.ts .
This is also working when replacing the original import with the otherwise warning import * and referencing to Redux.Store for example.
Any help would be appreciated :)
Im interested to buy your ebook as i read your free chapter. I follow your code until page 31, it mention to download certain codes.
I try to look for src/app/vendor from link given with the free chapter email, but it link to angular2-redux-chat git, which is different from the topic angular-reddit.
Please correct me if im wrong. Thank you for good angular ebook.
Why i'm getting these errors?
WARNING in ./src/app/app.component.ts
43:57-62 "export 'Store' was not found in 'redux'
WARNING in ./src/app/app.component.ts
43:82-87 "export 'Store' was not found in 'redux'
node --version
v6.9.1
npm --version
3.10.9
(it fails in Ubuntu and Mac)
ERROR in ./app/ts/vendor.ts
Module parse failed: /home/karel/dev/projects/tests/chatbot/angular2-redux-chat/node_modules/tslint-loader/index.js!/home/karel/dev/projects/tests/chatbot/angular2-redux-chat/app/ts/vendor.ts Line 2: Unexpected token
You may need an appropriate loader to handle this file type.
| // Polyfills
| import 'core-js/es6';
| import 'core-js/es6';
| import 'core-js/es7/reflect';
@ multi vendor
Let me know if you need additional info.
Thanks
Like the title says, I get 8 warnings that Store was not found in redux.
This is in a freshly cloned, newly npm-installed copy of this project.
I tried to "Google with Bing", but I couldn't find anything about this problem.
Any tips? Cause I would really like to play around with this project to get a better understanding about redux in Angular.
Thanks in advance.
in messages.service.ts:
messages: Observable<Message[]>;
this.messages = this.updates
.scan((messages: Message[],
operation: IMessagesOperation) => {
return operation(messages);
},
initialMessages)
.publishReplay(1)
.refCount();
I don't know how to reset the observable messages.
where is main.d.ts ???
how about explaining the old unusual way of resolving these types
and why your code has resorted to operating that
///
this is obsolete programming practice
no _dispatch.emit function is findable in any of your libraries
nor for the other constructs extending BehaviorSubject
Nice piece of work, any chance to see an ngrx version of this chat?
I know the code will be somewhat close to the redux version but just wondering :)
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.