Convert angular SafeWebview to typescript

Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2020-01-03 14:00:58 +01:00 committed by Lorenzo Alberto Maria Ambrosi
parent 146bfaa9de
commit 26d0e46367
2 changed files with 7 additions and 13 deletions

View File

@ -83,7 +83,7 @@ const app = angular.module('Etcher', [
require('angular-ui-router'),
// Components
require('./components/safe-webview'),
require('./components/safe-webview').MODULE_NAME,
// Pages
require('./pages/main/main.ts').MODULE_NAME,

View File

@ -14,21 +14,15 @@
* limitations under the License.
*/
'use strict'
/**
* @module Etcher.Components.SafeWebview
*/
const angular = require('angular')
const { react2angular } = require('react2angular')
import * as angular from 'angular';
import { react2angular } from 'react2angular';
import * as SafeWebview from './safe-webview';
const MODULE_NAME = 'Etcher.Components.SafeWebview'
const SafeWebview = angular.module(MODULE_NAME, [])
export const MODULE_NAME = 'Etcher.Components.SafeWebview';
const AngularSafeWebview = angular.module(MODULE_NAME, []);
SafeWebview.component(
'safeWebview',
react2angular(require('./safe-webview.jsx'))
)
module.exports = MODULE_NAME
AngularSafeWebview.component('safeWebview', react2angular(SafeWebview));