
AngularJS's `$location` service doesn't have a direct counterpart in Angular. This is largely because the `Location` service in Angular was pulled out of the `Router`, but was not purpose-built to stand on its own. This commit adds a new `@angular/common/upgrade` package with the beginnings of a new `LocationUpgradeService`. This service will more closely match the API of AngularJS and provide a way to replace the `$location` service from AngularJS. PR Close #30055
30 lines
817 B
JavaScript
30 lines
817 B
JavaScript
/**
|
|
* @license
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
|
|
const resolve = require('rollup-plugin-node-resolve');
|
|
const sourcemaps = require('rollup-plugin-sourcemaps');
|
|
|
|
const globals = {
|
|
'@angular/core': 'ng.core',
|
|
'@angular/common': 'ng.common',
|
|
'@angular/upgrade/static': 'ng.upgrade.static'
|
|
};
|
|
|
|
|
|
module.exports = {
|
|
entry: '../../../dist/packages-dist/common/fesm5/upgrade.js',
|
|
dest: '../../../dist/packages-dist/common/bundles/common-upgrade.umd.js',
|
|
format: 'umd',
|
|
exports: 'named',
|
|
amd: {id: '@angular/common/upgrade'},
|
|
moduleName: 'ng.common.upgrade',
|
|
plugins: [resolve(), sourcemaps()],
|
|
external: Object.keys(globals),
|
|
globals: globals
|
|
};
|