Comments (4)
I think it's fine, try to create a new angular project and you'll see that it is also without the =
ng new myproject
https://angular.io/guide/workspace-config#alternate-build-configurations
from ng-chrome-extension.
Ok, so that is unexpected.
I had to update the package.json
(as above) to get it to work correctly:
npm run build
I only noticed this issue as I was updating my console logger service (to work with a browser extension) and couldn't figure out why it wasn't working.
console-logger.service.ts:
...
const noop = (): any => undefined;
@Injectable({
providedIn: 'root'
})
export class ConsoleLoggerService implements Logger {
get info() {
if (isDebugMode) {
return partial(chrome.runtime.sendMessage);
} else {
return noop;
}
}
}
function partial(func, ...argsBound) {
return function(...args) {
return func.call(this, ...argsBound, ...args);
}
}
serviceWorker.js:
console.log('serviceWorker script loaded');
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
console.log(request);
})
popup.component.ts:
import { Component } from '@angular/core';
import { LoggerService } from "@utils-lib/services/loggers/logger.service";
@Component({
selector: 'app-popup',
templateUrl: './popup.component.html',
styleUrls: ['./popup.component.scss']
})
export class PopupComponent {
public filter = 'Assets'
constructor(private logger: LoggerService) {
this.logger.info('PopupComponent: constructor()');
}
public setFilter(value: string) {
this.filter = value;
this.logger.info('setFilter() - value: ' + value);
}
}
ng version:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 15.0.0
Node: 18.10.0
Package Manager: npm 8.19.2
OS: darwin arm64
Angular: 15.0.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, platform-browser, platform-browser-dynamic
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1500.0
@angular-devkit/build-angular 15.0.0
@angular-devkit/core 15.0.0
@angular-devkit/schematics 15.0.0
@schematics/angular 15.0.0
ng-packagr 15.0.0
rxjs 7.5.7
typescript 4.8.4
from ng-chrome-extension.
Sorry, my bad, I was typing:
ng build
Rather than:
npm run build
from ng-chrome-extension.
Good! :-)
from ng-chrome-extension.
Related Issues (20)
- Some thing doesn't work with Angular Material HOT 1
- Error: authentication required but no callback set HOT 7
- CSP error after upgrading from Angular 11 to 12 HOT 2
- npm install does not work on a mac HOT 3
- Project ignores Angular changes (watch not working) HOT 1
- Question: sharing common classes between layers HOT 1
- Access window.ethereum properties HOT 1
- Import primeng HOT 1
- I always get an error when I create a project with a "-" in the project name HOT 6
- Is there a wiki on how to update ng-chrome built extensions from manifest v2 to manifest v3 HOT 1
- Chnage Manifest file data based on environment/or with custom variables HOT 1
- Unable to add css urls and fonts in angular.json HOT 3
- getting data from the chrome storage doesn't trigger change detection HOT 2
- Using the extension as addition to existing web page HOT 1
- Problem with npm i HOT 1
- npm start not running on any port HOT 1
- JQuery plugin not working HOT 1
- load angular as content script
- how to load script like jquery.min.js into serviceWorker.ts HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-chrome-extension.