Wilson Mendes
@willmendesneto
Google Developer Expert Web Technologies
1. Access https://goo.gl/PibUcQ
2. Decrease the price to $0,00
3. Enjoy
<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
https://goo.gl/h2D1YG
import { FeatureToggleModule } from 'ngx-feature-toggle';
...
@NgModule({
...
declarations: [
YourAppComponent
],
imports: [ FeatureToggleModule ],
bootstrap: [YourAppComponent]
...
})
export class YourAppComponent {
}
...
<feature-toggle-provider [features]="featureToggleData">
<p>Enabled content</p>
<feature-toggle [featureName]="'enableContent'">
<p>Disabled content</p>
<p>In that case this content should not be rendered.</p>
</feature-toggle>
<feature-toggle
[featureName]="'enableContent'"
showWhenDisabled >
<p>Disabled content</p>
<p>But, it has `showWhenDisabled` attribute.</p>
<p>In that case this content should be rendered.</p>
</feature-toggle>
</feature-toggle-provider>
import { FeatureToggleModule } from 'ngx-feature-toggle';
...
@NgModule({
...
declarations: [
YourAppComponent
],
imports: [
FeatureToggleModule.forRoot({ enableContent: true })
],
exports: [FeatureToggleModule],
bootstrap: [YourAppComponent],
...
})
export class YourAppComponent {
}
...
<feature-toggle-provider [features]="featureToggleData">
<p>Enabled content</p>
<feature-toggle [featureName]="'enableContent'">
<p>Disabled content</p>
<p>In that case this content should not be rendered.</p>
</feature-toggle>
<feature-toggle
[featureName]="'enableContent'"
showWhenDisabled >
<p>Disabled content</p>
<p>But, it has `showWhenDisabled` attribute.</p>
<p>In that case this content should be rendered.</p>
</feature-toggle>
</feature-toggle-provider>
<page1>
</page1>
<component1 />
<component2>
</component2>
<component3 />
# Github: https://goo.gl/TXsXk3
# Usage:
# PKG_VERSION=<patch|minor|major> ./publish.sh
npm run test && \
npm run build && \
npm run bundlesize && \
node ./build.js && \
npm publish dist && \
npm version $PKG_VERSION -m "v%s"
ng-packagr -p ng-package.js
// Creating the bundle
// ESM2015 // ESM5
// FESM2015 // FESM5
// UMD
ng generate my-awesome-lib
// Generating a library
ng build my-awesome-lib --prod
cd dist/my-awesome-lib
npm publish
// Publishing a library
np
--no-yarn
--contents=dist
// Publishing a library
https://goo.gl/WYZFjF
https://goo.gl/wQQ7yh
https://goo.gl/E7Ffzr
Wilson Mendes
@willmendesneto
Google Developer Expert Web technologies