I try to develop a simple Google Chrome extension using angular CLI but it's stuck on Loading
.
If I try to run my app normally using npm start
and open it in browser's window, it works fine.
I also try to compile my app using ng build
, put my manifest.json
inside my dist
folder but the result is the same.
my manifest.json :
{
"manifest_version": 2,
"name": "Weather for Chrome",
"description": "Weather for Chrome is a simple Google chrome plugin using angular CLI",
"version": "1.0",
"browser_action": {
"default_icon": "assets/Soleil.png",
"default_popup": "index.html"
},
"permissions": [
"activeTab",
"https://ajax.googleapis.com/"
]
}
app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { WeatherService } from "./_services/weather.service";
import { PopupComponent } from "./popup/popup.component";
@NgModule({
declarations: [
AppComponent,
PopupComponent
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
AppRoutingModule
],
providers: [
WeatherService
],
bootstrap: [AppComponent]
})
export class AppModule { }
app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.sass']
})
export class AppComponent {
title = 'app works!';
}
app-routing.module.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.sass']
})
export class AppComponent {
title = 'app works!';
}
I don't know how to debug a chrome extension. Thanks for answers.