Skip to content

Commit

Permalink
cleaner code
Browse files Browse the repository at this point in the history
  • Loading branch information
Kersten Lorenz authored and Kersten Lorenz committed Jul 17, 2017
1 parent d58b0fb commit b41c959
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"file-loader": "^0.10.1",
"html-loader": "^0.4.5",
"html-webpack-plugin": "^2.28.0",
"istanbul-instrumenter-loader": "^2.0.0",
"live-server": "^1.2.0",
"ngtemplate-loader": "^1.3.1",
"node-sass": "^4.5.3",
Expand Down Expand Up @@ -83,22 +82,18 @@
},
"scripts": {
"build:dev": "npm run clean:dist && webpack --config config/webpack.dev.js --profile --env.NODE_ENV=development",
"build:staging": "npm run clean:dist && webpack --config config/webpack.prod.js --env.NODE_ENV=test --profile --bail",
"build:prod": "npm run clean:dist && webpack --config config/webpack.prod.js --env.NODE_ENV=production --profile --bail",
"build:spec": "npm run clean:dist && webpack --config config/webpack.karma.js --env.NODE_ENV=production --profile --bail",
"build": "npm run build:dev",
"clean:dist": "rimraf dist",
"clean:install": "npm set progress=false && npm install",
"clean:all": "npm cache clean && rimraf node_modules doc test-results coverage dist dll",
"preclean:install": "npm run clean:all",
"server:dev": "webpack-dev-server --config config/webpack.dev.js --profile --watch --env.NODE_ENV=development",
"serve:dist": "live-server dist --port=3000 --cors --open=/aol/ --mount=/aol:./dist",
"start": "npm run server:dev",
"watch:dev": "npm run build:dev -- --watch",
"watch:prod": "npm run build:prod -- --watch",
"watch:test": "npm run test -- --auto-watch --no-single-run",
"watch": "npm run watch:dev",
"mock-backend": "node src/backend-mock/index.js"
"start-apps": "node src/app-backend-mocks/index.js",
"portal": "npm-run-all -p -r start-apps watch:prod serve:dist"
},
"version": "0.0.1"
}
File renamed without changes.
14 changes: 2 additions & 12 deletions src/app/module-portal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,21 @@ portal.config(function ($sceDelegateProvider) {
// remove "!" prefix
portal.config(function ($locationProvider: ILocationProvider) {
'ngInject';
console.log('Hello World!');
$locationProvider.hashPrefix('');
});

portal.run(function($rootScope: IRootScopeService) {
'ngInject';

$rootScope.$on("$stateChangeError", console.log.bind(console));
});

portal.run(function ($state: StateService, $location: ILocationService, $window: angular.IWindowService,) {
'ngInject';

robot.on(NavigationMessage.APP_STATE_SUCCESS, function (event) {
//$location.path('fsadf/dfsdfsdf/fsdf');
// const url = `${$location.protocol()}${$location.host()}${event.data.url}`;
//const url = `#/app/hello${event.data.url}`;
//$window.location.replace(url);
//$state.go('about');
console.log('old path', $location.path());
// Not implemented yet
console.log(NavigationMessage.APP_STATE_SUCCESS, 'occured:', event.data.path);
// $location.path('/about');
// $location.url(event.data.url);
console.log('new path', $location.path());
// console.log('new path', event.source.location);
console.log('current path in portal:', $location.path());
});

});

0 comments on commit b41c959

Please sign in to comment.