Wilson Mendes
@willmendesneto
Google Developer Expert Web technologies
<ItemsList />
<About />
<Gallery />
...
<page1>
</page1>
<component1 />
<component2>
</component2>
<component3 />
npm install -g @angular/cli
// Installing Angular CLI
ng new my-app
// Creating a new Angular App
ng serve
// Starting local server
structure of a page
<page1>
</page1>
<component1 />
<component2>
</component2>
<component3 />
<page1>
</page1>
<component1 />
<component2>
</component2>
<component3 />
...
import {
NgxPageClickModule
} from 'ngx-page-click';
...
@NgModule({
...
imports: [NgxPageClickModule],
...
})
export class AppModule { }
<ngx-page-click
[disabled]="disabled"
[outsideClickHandler]="outsideClickHandler"
[listenTo]="on"
>
<div><p>Content goes here</p></div>
</ngx-page-click>
...
import {
FeatureToggleModule
} from 'ngx-feature-toggle';
...
@NgModule({
...
imports: [FeatureToggleModule],
...
})
export class AppModule { }
<!--
const features = {
enableDescription: true
}
-->
<feature-toggle-provider [features]="features">
<div *featureToggle="'enableDescription'">
<p>condition is `true`</p>
<p>this content will be displayed.</p>
</div>
<div *featureToggle="'!enableDescription'">
<p>condition is `false`</p>
<p>this content will be displayed.</p>
</div>
</feature-toggle-provider>
import {
Routes, RouterModule
} from '@angular/router';
import {
FeatureToggleModule,
NgxFeatureToggleCanLoadGuard,
} from 'ngx-feature-toggle';
...
// Using route guards in application
const routes: Routes = [
{
path: 'playground',
component: PlaygroundComponent,
canLoad: [NgxFeatureToggleCanLoadGuard],
data: {
featureToggle: ['enablePlayground'],
}
},
];
...
import {
NgxSkeletonLoaderModule
} from 'ngx-skeleton-loader';
...
@NgModule({
...
imports: [NgxSkeletonLoaderModule],
...
})
export class AppModule { }
<ngx-skeleton-loader
count="5"
[theme]="{
'border-radius': '5px',
height: '50px'
}"
>
</ngx-skeleton-loader>
...
aria-valuemax="100"
aria-valuemin="0"
aria-valuetext="Loading..."
role="progressbar"
...
...
.skeleton-loader {
&.progress {
/* ...css animation for progress */
}
@media (prefers-reduced-motion: reduce) {
/* ...removing css animation */
&.progress {
background-image: none;
}
}
}
<!-- Uses `progress-dark` as animation -->
<ngx-skeleton-loader
animation="progress-dark"
count="3"
>
</ngx-skeleton-loader>
<ngx-skeleton-loader
count="5"
[theme]="{
'border-radius': '5px',
height: '50px',
'background-color': '#992929',
border: '1px solid white'
}"
></ngx-skeleton-loader>
/*
* You can find more details about `:host`
* at Angular Component Style Docs
* https://angular.io/guide/component-styles#host
*/
:host >>> ngx-skeleton-loader .skeleton-loader {
border-radius: 5px;
height: 50px;
background-color: #992929;
border: 1px solid white;
}
Wilson Mendes
@willmendesneto
Google Developer Expert Web technologies