Change the buiding tool to angular-cli
[holmes/rule-management.git] / rulemgt-frontend / src / main.ts
similarity index 74%
rename from rulemgt/src/main/frontend/src/alarm/main.ts
rename to rulemgt-frontend/src/main.ts
index 049fe75..ac36dfe 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
 import { enableProdMode } from '@angular/core';
-import {AppModule } from './app/app.module';
-if (process.env.ENV === 'production') {
-    enableProdMode();
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
+
+import { AppModule } from './app/app.module';
+import { environment } from './environments/environment';
+
+if (environment.production) {
+  enableProdMode();
 }
-platformBrowserDynamic().bootstrapModule(AppModule);
+
+platformBrowserDynamic().bootstrapModule(AppModule)
+  .catch(err => console.log(err));