Git Product home page Git Product logo

Comments (4)

larscom avatar larscom commented on August 19, 2024

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

Screenshot_20221123_204502

https://angular.io/guide/workspace-config#alternate-build-configurations

from ng-chrome-extension.

Robinyo avatar Robinyo commented on August 19, 2024

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);
  }

}

Screen Shot 2022-11-24 at 07 04 37

Screen Shot 2022-11-24 at 07 04 49

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.

Robinyo avatar Robinyo commented on August 19, 2024

Sorry, my bad, I was typing:

ng build

Rather than:

npm run build

from ng-chrome-extension.

larscom avatar larscom commented on August 19, 2024

Good! :-)

from ng-chrome-extension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.