title: Change the field mapping for Number Type in Smartedit
body: <p>I upgraded a SAP Hybris/Commerce from v1808 to v2205. In my custom SmartEdit-Extension I had a service that changed the editor template for the number type so that it could hold a value of 0. (I used this tutorial for it: <a href="https://dmitrykrivenko.blogspot.com/2018/08/customizing-smartedit-in-hybris.html" rel="nofollow noreferrer">Customizing smartedit in hybris</a></p>
  <p>Here is the code of the Service I created</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>angular
      .module('newGenericEditorConfigurationServiceModule', ['editorFieldMappingServiceModule', 'newsmarteditContainerTemplates'])
      .service('newGenericEditorConfigurationService', function(editorFieldMappingService) {
  
          this.overrideDefaultEditorFieldMappings = function() {
              editorFieldMappingService.addFieldMapping('Number', null, null, {
                  template: 'newNumberTemplate.html'
              });
          };
  
      });</code></pre>
  </div>
  </div>
  </p>
  <p>Now the in v2205 Smartedit got upgraded from Angularjs to Angular and so the service is not working anymore.</p>
  <p>Anyone has an idea how to do it? I already tried the code from here: <a href="https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/c7eda9f7e7104dd3b476f0de6f987a66/4c833c3697574af4b30402317d41eb65.html?locale=en-US" rel="nofollow noreferrer">SPA Help Portal Trail</a></p>
  <pre><code>    . . . . . . . . . 
  
  import { SeEntryModule, EditorFieldMappingService, moduleUtils } from 'smarteditcommons';
  
  . . . . . . ..
  @NgModule({
      imports: [BrowserModule, UpgradeModule],
      declarations: [],
      entryComponents: [],
      providers: [
          {
              provide: HTTP_INTERCEPTORS,
              useClass: DummyInterceptor,
              multi: true
          },
          moduleUtils.bootstrap(
              (editorFieldMappingService: EditorFieldMappingService) =&gt; {
                  // Adds the mapping. With this the new widget will be used for all fields of type &quot;Range&quot;
                  editorFieldMappingService.addFieldMapping('Range', null, null, {
                      template: 'rangeFieldTemplate.html'
                  });
              },
              [EditorFieldMappingService]
          )
      ]
  })
  export class SmartedittrailContainerModule {}
  </code></pre>
  <p>But it is not working I get still the same old template. Here <a href="https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/c7eda9f7e7104dd3b476f0de6f987a66/6c036ecad0de4e269fb50f2a41de1271.html?locale=en-US" rel="nofollow noreferrer">SAP Trail Creating a Custom Component</a> they are using the same old AngularJs Syntax, but don't show how to wire it up to the new Angluar Module.</p>
  <pre><code>angular.module('trainingModule',  ['editorFieldMappingServiceModule', 'smartedittrail/cmssmarteditContainerTemplates'])
      .run(function(editorFieldMappingService) {
          editorFieldMappingService.addFieldMapping('Integer', null, null, {
              template: 'web/featureExtensions/smartedittrail/cmssmarteditContainer/integer-editorTemplate.html'
          });
      });
  </code></pre>
  <p>Anyone has an idea how to do it in the new version?</p>