Demo app working

Refs #344
This commit is contained in:
Will Abson 2016-07-14 23:20:48 +01:00
parent c68de6d89d
commit 1fc36b6ded
6 changed files with 64 additions and 41 deletions

View File

@ -1,33 +1,40 @@
/*! /*!
* @license * @license
* Copyright 2016 Alfresco Software, Ltd. * Copyright 2016 Alfresco Software, Ltd.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { bootstrap } from '@angular/platform-browser-dynamic'; import { bootstrap } from '@angular/platform-browser-dynamic';
import { Ng2ActivitiProcesslistComponent } from 'ng2-activiti-processlist/dist/ng2-activiti-processlist'; import {
ACTIVITI_PROCESSLIST_PROVIDERS,
@Component({ ACTIVITI_PROCESSLIST_DIRECTIVES
selector: 'my-app', } from 'ng2-activiti-processlist/dist/ng2-activiti-processlist';
template: `<ng2-activiti-processlist></ng2-activiti-processlist>`, import { ALFRESCO_CORE_PROVIDERS } from 'ng2-alfresco-core';
directives: [Ng2ActivitiProcesslistComponent] import { HTTP_PROVIDERS } from '@angular/http';
})
class MyDemoApp { @Component({
constructor() { selector: 'my-app',
console.log('constructor'); template: `<activiti-processlist></activiti-processlist>`,
} providers: [ACTIVITI_PROCESSLIST_PROVIDERS],
} directives: [ACTIVITI_PROCESSLIST_DIRECTIVES]
bootstrap(MyDemoApp, [ })
Ng2ActivitiProcesslistComponent class MyDemoApp {
]); constructor() {
console.log('constructor');
}
}
bootstrap(MyDemoApp, [
ALFRESCO_CORE_PROVIDERS,
HTTP_PROVIDERS
]);

View File

@ -19,11 +19,13 @@
// map tells the System loader where to look for things // map tells the System loader where to look for things
var map = { var map = {
'ng2-activiti-processlist': 'node_modules/ng2-activiti-processlist', 'app': 'dist',
'@angular': 'node_modules/@angular', '@angular': 'node_modules/@angular',
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api', 'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
'rxjs': 'node_modules/rxjs', 'rxjs': 'node_modules/rxjs',
'app': 'dist/' 'ng2-translate': 'node_modules/ng2-translate',
'ng2-activiti-processlist': 'node_modules/ng2-activiti-processlist',
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core/dist'
}; };
// packages tells the System loader how to load when no filename and/or no extension // packages tells the System loader how to load when no filename and/or no extension
@ -31,7 +33,9 @@
'app': { main: 'main.js', defaultExtension: 'js' }, 'app': { main: 'main.js', defaultExtension: 'js' },
'rxjs': { defaultExtension: 'js' }, 'rxjs': { defaultExtension: 'js' },
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' }, 'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
'ng2-activiti-processlist': { main: 'index.js', defaultExtension: 'js' } 'ng2-translate': { defaultExtension: 'js' },
'ng2-activiti-processlist': { main: 'index.js', defaultExtension: 'js' },
'ng2-alfresco-core': { main: 'index.js', defaultExtension: 'js' }
}; };
var ngPackageNames = [ var ngPackageNames = [

View File

@ -15,4 +15,19 @@
* limitations under the License. * limitations under the License.
*/ */
import { Ng2ActivitiProcesslistComponent } from './src/components/ng2-activiti-processlist.component';
import { ActivitiProcessService } from './src/services/activiti-process-service.service';
// components
export * from './src/components/ng2-activiti-processlist.component'; export * from './src/components/ng2-activiti-processlist.component';
// services
export * from './src/services/activiti-process-service.service';
export const ACTIVITI_PROCESSLIST_DIRECTIVES: [any] = [
Ng2ActivitiProcesslistComponent
];
export const ACTIVITI_PROCESSLIST_PROVIDERS: [any] = [
ActivitiProcessService
];

View File

@ -27,7 +27,7 @@ declare let __moduleName: string;
@Component({ @Component({
moduleId: __moduleName, moduleId: __moduleName,
selector: 'ng2-activiti-processlist', selector: 'activiti-processlist',
styles: [ styles: [
` `
:host h1 { :host h1 {

View File

@ -42,10 +42,7 @@
"material-design-icons": "2.2.3", "material-design-icons": "2.2.3",
"material-design-lite": "1.1.3", "material-design-lite": "1.1.3",
"ng2-translate": "2.2.2", "ng2-activiti-processlist": "^0.1.0"
"ng2-alfresco-datatable": "^0.1.12",
"ng2-alfresco-core": "^0.1.36"
}, },
"devDependencies": { "devDependencies": {
"browser-sync": "2.10.0", "browser-sync": "2.10.0",