项目作者: blaskodaniel

项目描述 :
Example todo app built with Angular1.x+Redux upon Sense/Net ECM
高级语言: JavaScript
项目地址: git://github.com/blaskodaniel/sn-angular-redux-todo-app.git
创建时间: 2017-01-14T16:53:45Z
项目社区:https://github.com/blaskodaniel/sn-angular-redux-todo-app

开源协议:Apache License 2.0

下载


Todo App example with SN7, Angular 1.x and Redux

This example is simple todo app built with Angular1.x+Redux upon Sense/Net ECM which has been prepared to demonstrate how to use the new Sense/Net ECM related libraries sn-client-js
and sn-redux.

Quick start

  1. $ git clone https://github.com/blaskodaniel/sn-angular-redux-todo-app.git
  2. $ cd sn-angular-redux-todo-app
  3. $ npm install
  4. $ npm start

Settings

To use this example you’ll need a Sense/Net ECM portal. To connect the app with the portal set your site’s url as the app’s siteUrl

  1. import { SetSiteUrl } from 'sn-client-js';
  2. SetSiteUrl('https://mysite.com');

Go to your portal’s Portal.setting (/Root/System/Settings/Portal.settings) and check the allowed origins. To get the app working you have to add the app’s domain as an allowed origin so that the app can send requests to the
portal and get or set data.

  1. {
  2. AllowedOriginDomains: [ "localhost" ]
  3. }

For further information about CORS in Sense/Net ECM check this article.

The example app uses one of the built-in TaskList Content in the default Sense/Net ECM install (/workspaces/Project/budapestprojectworkspace/Tasks). If you removed this Content and its children tasks earlier
or want to try with another TaskList change the value of the path variable of SnTodoListComponent in app.component.ts to the chosen list’s path.

The example app demonstrates not only how to fetching data but also Content creation and delete. The app doesn’t provide authentication because of it’s simplicity so you have to make some permission changes
in your Sense/Net ECM portal to let Visitor users adding and removing tasks from the chosen parent list.
If you are not familiar with Sense/Net’s permission system check the following wiki articles: