I\'m trying to load some Responsive ads in an AdComponent in my app. The component is dead simple:
import { Component } from \'@angular/core\';
There is a module that works very well for me: ng2-adsense.
If you'll choose to use it, your HTML code will look something like this:
After you install the module, you need to import it and add it to your NgModule:
import { AdsenseModule } from 'ng2-adsense';
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
AdsenseModule, // <--- Add to imports
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
And add this standard adsense code in your index.html: