Code Monkey home page Code Monkey logo

ionic2-app-base's Introduction

ionic2-app-base's People

Contributors

5amfung avatar adamdbradley avatar amuramoto avatar brandyscarney avatar chrisgriffith avatar danailminchev avatar danbucholtz avatar danielsogl avatar dylanvdmerwe avatar gianpaj avatar ihadeed avatar iignatov avatar imhoffd avatar janpio avatar jgw96 avatar jthoms1 avatar kensodemann avatar manucorporat avatar matheo avatar mhartington avatar mlynch avatar nunoarruda avatar oddcb avatar patrickjs avatar petercn avatar ramonornela avatar root-io avatar tlancina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ionic2-app-base's Issues

gulpfile and karma configurations are missing

Hi!

I am wondering why is gulpfile.js and karma configuration missing in the base, since it is present in the master branch of Ionic2. Or how can we include that feature to the template? Do we need to do it manually?

Thanks!

Error with main.prod.ts

This import is at the top of main.prod.ts
import { AppModuleNgFactory } from './app.module.ngfactory';

However, in atom it says that it cannot find the module and if I search for the file in the project it does not exist. What is the purpose of the import?

package.json needs to be updated to beta.5

The package.json in this template is using ionic-angular beta.4, and the angular2 and zone libraries are also outdated.

Creating a new project from the CLI currently results in this error when serving:

node_modules/ionic-angular/components.core.scss
Error: Import directives may not be used within control directives or mixins.
        on line 35 of node_modules/ionic-angular/components.core.scss
>>   @import "fonts/ionicons";
   --^

Not sure if this is the cause of the error or not.

Testing framework support

The projects templates should have embedded support for testing frameworks (like karma+jasmine) similar to what anglular-cli generates.
Or add a command option to the ionic command to add test support to an ionic project

ionic 2 page redirection automatically

I am using ionic 2.

Here is my submit function.

submit(){

if(this.ImageURL != undefined)
{
   var fileName = 'sample-' + new Date().getTime() + '.jpg';
   let uploadTask = this.firebase.storage().ref('profile/' + fileName);
    console.log(this.updateprofile.value);
     var upload = uploadTask.put(this.getURL).then((snapshot) => {
     this.updateprofile.controls['FILE'].setValue(snapshot.a.downloadURLs[0]); 
     var val=this.af.database.list('/users');
     val.update(this.key,this.updateprofile.value);
     this.platform.ready().then(() => {
        window.plugins.toast.show("Profile updated success", "short",'bottom',1000);
   });

 });
}

if(this.ImageURL === undefined)
{
console.log(this.updateprofile.value);
var val=this.af.database.list('/users');
val.update(this.key,this.updateprofile.value);
this.platform.ready().then(() => {
window.plugins.toast.show("Profile update success", "short",'bottom',1000);

     });

}
}
Its work perfectly.But its automatically redirect to rootpage.

Actually i does not wrote any functionality in page redirection.

How can i fix this issue.

Kindly advice me.

Thanks.

Trying to start with --v2 --ts throws an error

Here is my command line output:

c:\Workspaces\RevRadio\mobile>ionic start revradio --v2 --ts
Creating Ionic app in folder c:\Workspaces\RevRadio\mobile\revradio based on tabs project
Downloading: https://github.com/driftyco/ionic2-app-base/archive/typescript.zip
[=============================]  100%  0.0s
Downloading: https://github.com/driftyco/ionic2-starter-tabs/archive/typescript.zip
[=============================]  100%  0.0s
Installing npm packages...
Error with start undefined
Error Initializing app: There was an error with the spawned command: npminstall
There was an error with the spawned command: npminstall

Running the install without the --ts argument works as expected.

unmet dependencies upon upgrading to ionic 3

getting:
npm WARN @angular/[email protected] requires a peer of typescript@^2.0.2 but none was installed.
npm WARN @angular/[email protected] requires a peer of typescript@^2.1.5 but none was installed.
npm WARN [email protected] requires a peer of typescript@^2.1.0 but none was installed.

Cordova CLI: 6.5.0
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
ios-deploy version: 1.9.0
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v7.4.0
Xcode version: Xcode 8.2 Build version 8C38

package.json dependencies copied from upgrade steps

Change the default starter to use typescript

We want to change to using Typescript by default since that's what all of our docs are in. We need to update the starters, generators, CLI, etc. all at the same time and communicate this to our users really well.

error TS2307: Cannot find module '@angular/core'.

BLs-MacBook-Air:apps bllohar$ ionic start mySideMenu sidemenu --v2
Creating Ionic app in folder /Users/bllohar/Stuff/apps/mySideMenu based on sidemenu project
Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
[=============================] 100% 0.0s
Downloading: https://github.com/driftyco/ionic2-starter-sidemenu/archive/master.zip
[=============================] 100% 0.0s
Installing npm packages...

Adding initial native plugins
[=============================] 100% 0.0s

Adding in iOS application by default
add to body class: platform-ios
Saving your Ionic app state of platforms and plugins
Saved platform
Saved plugins
Saved package.json

โ™ฌ โ™ซ โ™ฌ โ™ซ Your Ionic app is ready to go! โ™ฌ โ™ซ โ™ฌ โ™ซ

Make sure to cd into your new app directory:
cd mySideMenu

To run your app in the browser (great for initial development):
ionic serve

To run on iOS:
ionic run ios

To run on Android:
ionic run android

To test your app on a device easily, try Ionic View:
http://view.ionic.io

Building an Enterprise App? We can help!
http://ionic.io/enterprise

New! Add push notifications, live app updates, and more with Ionic Platform!
https://apps.ionic.io/signup

New to Ionic? Get started here: http://ionicframework.com/docs/v2/getting-started

BLs-MacBook-Air:apps bllohar$ cd mySideMenu/
BLs-MacBook-Air:mySideMenu bllohar$ ionic serve

Running 'serve:before' npm script before serve

mysidemenu@ watch /Users/bllohar/Stuff/apps/mySideMenu
ionic-app-scripts watch
[16:30:25] ionic-app-scripts 0.0.23
[16:30:25] watch started ...
[16:30:25] build dev started ...
[16:30:25] clean started ...
[16:30:25] clean finished in 6 ms
[16:30:25] copy started ...
[16:30:25] typescript compiler started ...
[16:30:25] lint started ...
[16:30:25]

[16:30:25] copy finished in 90 ms
[16:30:29] src/app/app.component.ts(1,38): error TS2307: Cannot find module '@angular/core'.
[16:30:29] src/app/app.module.ts(1,26): error TS2307: Cannot find module '@angular/core'.
[16:30:29] src/app/main.dev.ts(1,40): error TS2307: Cannot find module '@angular/platform-browser-dynamic'.
[16:30:29] src/pages/page1/page1.ts(1,27): error TS2307: Cannot find module '@angular/core'.
src/pages/page2/page2.ts(1,27): error TS2307: Cannot find module '@angular/core'.
[16:30:29] typescript compiler ready in 4.89 s
[16:30:29] bundle dev started ...
[16:30:30] Error: Could not resolve '@angular/platform-browser-dynamic' from /Users/bllohar/Stuff/apps/mySideMenu/.tmp/app/main.dev.js
at Error (native)
at /Users/bllohar/Stuff/apps/mySideMenu/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js:78:21
at /Users/bllohar/Stuff/apps/mySideMenu/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/browser-resolve/index.js:265:24
at /Users/bllohar/Stuff/apps/mySideMenu/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:46:14
at process (/Users/bllohar/Stuff/apps/mySideMenu/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:173:43)
at ondir (/Users/bllohar/Stuff/apps/mySideMenu/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:188:17)
at load (/Users/bllohar/Stuff/apps/mySideMenu/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:69:43)
at onex (/Users/bllohar/Stuff/apps/mySideMenu/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:92:31)
at /Users/bllohar/Stuff/apps/mySideMenu/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:22:47
at FSReqWrap.oncomplete (fs.js:82:15)

[16:30:30] sass started ...
[16:30:30] sass failed: Cannot generate Sass files without first bundling JavaScript files in order to know all used modules. Please build JS files first.

[16:30:30] build dev failed: Build failed

[16:30:30]

[16:30:30] watch ready in 5.94 s
Running live reload server: http://192.168.1.12:35729
Watching: www//*, !www/lib//*
โˆš Running dev server: http://192.168.1.12:8100
Ionic server commands, enter:
restart or r to restart the client app from the root
goto or g and a url to have the app navigate to the given url
consolelogs or c to enable/disable console log output
serverlogs or s to enable/disable server log output
quit or q to shutdown the server and exit

ionic $

seems current package.json missing dependencies.

Consider using absolute package versions in package.json instead of carets

From @fiznool on October 13, 2016 10:37

Short description of the problem:

Today, angular 2.1 was released.

The current dependencies list in package.json that is generated from ionic start looks like this:

"dependencies": {
  "@angular/common": "^2.0.0",
  "@angular/compiler": "^2.0.0",
  "@angular/compiler-cli": "^0.6.2",
  "@angular/core": "^2.0.0",
  "@angular/forms": "^2.0.0",
  "@angular/http": "^2.0.0",
  "@angular/platform-browser": "^2.0.0",
  "@angular/platform-browser-dynamic": "^2.0.0",
  "@angular/platform-server": "^2.0.0",
  "ionic-angular": "^2.0.0-rc.0",
  "ionicons": "^3.0.0",
  "@ionic/storage": "^1.0.3",
  "ionic-native": "^2.0.3",
  "rxjs": "^5.0.0-beta.12",
  "zone.js": "^0.6.21"
}

This is currently causing the following issues when npm install completes:

npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of [email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of [email protected] but none was installed.

A quick check of npm ls --depth=0 yields the following:

โ”œโ”€โ”€ @angular/[email protected]
โ”œโ”€โ”€ UNMET PEER DEPENDENCY @angular/[email protected]
โ”œโ”€โ”€ @angular/[email protected]
โ”œโ”€โ”€ UNMET PEER DEPENDENCY @angular/[email protected]
โ”œโ”€โ”€ @angular/[email protected]
โ”œโ”€โ”€ @angular/[email protected]
โ”œโ”€โ”€ @angular/[email protected]
โ”œโ”€โ”€ @angular/[email protected]
โ”œโ”€โ”€ UNMET PEER DEPENDENCY @angular/[email protected]
โ”œโ”€โ”€ @ionic/[email protected]
โ”œโ”€โ”€ @ionic/[email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ UNMET PEER DEPENDENCY [email protected]
โ”œโ”€โ”€ [email protected]
โ””โ”€โ”€ [email protected]

npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: [email protected], required by @angular/[email protected]
npm ERR! peer dep missing: [email protected], required by @angular/[email protected]
npm ERR! peer dep missing: [email protected], required by @angular/[email protected]
npm ERR! peer dep missing: [email protected], required by @angular/[email protected]
npm ERR! peer dep missing: [email protected], required by @angular/[email protected]

So, as you can see, the caret in our package.json has caused some updated packages to be installed, but these now create unsatisfied peer dependency errors. The reason for this, is that the angular packages which define their peer dependencies do so without a caret, i.e. they explicitly reference a particular version.

It could be argued that angular shouldn't be doing this, but to stop broken installs, I suggest that the ionic start command should create a package.json dependencies list without carets:

"dependencies": {
  "@angular/common": "2.0.0",
  "@angular/compiler": "2.0.0",
  "@angular/compiler-cli": "0.6.2",
  "@angular/core": "2.0.0",
  "@angular/forms": "2.0.0",
  "@angular/http": "2.0.0",
  "@angular/platform-browser": "2.0.0",
  "@angular/platform-browser-dynamic": "2.0.0",
  "@angular/platform-server": "2.0.0",
  "ionic-angular": "2.0.0-rc.0",
  "ionicons": "3.0.0",
  "@ionic/storage": "1.0.3",
  "ionic-native": "2.0.3",
  "rxjs": "5.0.0-beta.12",
  "zone.js": "0.6.21"
}

I'd argue that this should be the default behaviour for apps anyway - we should be locking down our dependencies unless we explicitly want to update them.

Copied from original issue: ionic-team/ionic-cli#1535

Proposal: wait for deviceready before bootstrapping Angular app

Having to wait for Platform.ready() in various parts of the code that use Ionic Native / Cordova plugins is a pain.

Why not just wait for the deviceready event before bootstrapping the Angular app?

Something like this in main.ts:

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';

function bootstrap() {
  platformBrowserDynamic().bootstrapModule(AppModule);
}

if (window['cordova']) {
  document.addEventListener('deviceready', () => bootstrap());
} else {
  bootstrap();
}

Pin dependencies to exact versions

Just generated a new app with ionic start new-app --v2 --template blank, and doing npm list --depth 0 shows a bunch of errors

ionic-hello-world@ /Users/mirko/Projects/Ionic2/new-app
โ”œโ”€โ”€ @angular/[email protected]
โ”œโ”€โ”€ UNMET PEER DEPENDENCY @angular/[email protected]
โ”œโ”€โ”€ @angular/[email protected]
โ”œโ”€โ”€ UNMET PEER DEPENDENCY @angular/[email protected]
โ”œโ”€โ”€ @angular/[email protected]
โ”œโ”€โ”€ @angular/[email protected]
โ”œโ”€โ”€ @angular/[email protected]
โ”œโ”€โ”€ @angular/[email protected]
โ”œโ”€โ”€ UNMET PEER DEPENDENCY @angular/[email protected]
โ”œโ”€โ”€ @ionic/[email protected]
โ”œโ”€โ”€ @ionic/[email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ UNMET PEER DEPENDENCY [email protected]
โ”œโ”€โ”€ [email protected]
โ””โ”€โ”€ [email protected]

npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: [email protected], required by @angular/[email protected]
npm ERR! peer dep missing: [email protected], required by @angular/[email protected]
npm ERR! peer dep missing: [email protected], required by @angular/[email protected]

Due to the angular 2.1.0 release a couple of things are not quite right: the latest @angular/compiler-cli is now 2.1.0 so it doesn't make sense to use 0.6.4, and it installed [email protected] when Angular has it pinned to 5.0.0-beta.12.

Caret ranges are a nightmare to work with, I'm not sure why people use them. (I'm glad Yarn at least uses lockfiles by default.)

cannot read property __symbol__ of undefined

When trying to serve my application ionic serve I get no error messages or failed builds. Although my application doesn't go further than the 'Loading' screen.

Uncaught TypeError: Cannot read property 'symbol' of undefined(anonymous function) @ dom.js:19(anonymous function) @ main.dev.js:3

This is the output produced by the serverlogs:

image

I converted my Ionic2 beta 11 to ionic rc0. Just wondering why it doesn't start. According to my editor and the ionic cli, my typescript is correct. (except editor complains about experimentalDecorators not being defined while it is).

Suggestion: Include Content Security Policy & Whitelist plugin by default

From @joshuamorony on April 23, 2016 23:17

I feel like one of the most common issues people are running into is not including the whitelist plugin / not having a content security policy defined in index.html. I think the concept of the CSP tag is very confusing as well.

Would it be reasonable to add a default Content Security Policy tag to the generated index.html file?

Copied from original issue: ionic-team/ionic-framework#6296

Ionic 2.1 missing angular2

When running ionic start --v2 <app_folder>, the package.json file has no reference to angular.

When running ionic serve immediatly after, I receive ts complication errors:

cannot find module '@angular/core'...etc

I think we should add the angular 2 requirements in the package.json and not rely on angular2 being installed globally.

gulpfile.js not found

When i ran ionic serve command, not generate gulpfile.js .
Does Anyone have this issue?

Cannot find module "ionic-native"

question: Order of polyfills.js

The background to this question comes from danielsogl/awesome-cordova-plugins#505

Basically it appears there's an issue with how the FileReader API is patched by various agents, namely Zone.js, Ionic Native and the Cordova file plugin itself. The resulting behaviour made events like onloadend and similar not reliably fire from the FileReader. It pointed to a Zone.js related issue.

After a bit of exploring and experimenting I found that by moving the polyfills.js script tag to the top of my index.html, before the cordova.js tag, the issue went away. Presumably this is because polyfills.js contains zone.js in it, and so by this re-ordering somehow the issue is resolved.

It would be good to know if this is a safe thing to do. Presumably there was a reason why the polyfills.js was put after cordova.js originally.

Any information much appreciated.

feat: Reference demo: Tabs with individual sidemenus

From @mpaland on February 25, 2016 9:57

Type: feat

Ionic Version: 2.x

Platform: all

I've seen and read this requirement so often (in the forum, too):
A reference implementation using a tabbed interface where every tab has its own sidemenu.
It's like a combination out of the ionic-starter-tabs and ionic-starter-sidemenu.
Perhaps you can consider creating a v2 reference ionic-starter-tabs-sidemenu app.
Would be really great for a lot of folks!

Copied from original issue: ionic-team/ionic-framework#5602

ionic serve fails (Promise is not defined)

There is an error in gulpfile.js. It needs es6-promise to work correctly.

This can be fixed manually adding:

require('es6-promise').polyfill();

To line 6 in gulpfile.js, and installing es6-promise with npm

npm install es6-promise

FIXED, SEE LAST COMMENT

Default service worker has scope of /assets only, need to have service-worker.js at index.html level

Default service-worker.js is under /assets directory. From post http://www.html5rocks.com/en/tutorials/service-worker/introduction/
"One subtlety with the register method is the location of the service worker file."
Having service-worker under /assets folder will not allow service worker to control entire origin.
Better to have default behavior where service worker's scope is entire origin. This can be fixed by moving service-worker.js to src directory.

EPEERINVALID on "ionic start"

command ionic start myApp tabs --v2 is showing following error:

npm ERR! Linux 4.4.0-66-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.8.1
npm ERR! npm  v2.15.11
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer @angular/[email protected] wants typescript@^2.0.2
npm ERR! peerinvalid Peer @angular/[email protected] wants typescript@^2.1.5
npm ERR! peerinvalid Peer @ionic/[email protected] wants typescript@*

I have updated ionic (2.2.1) and cordova (6.5.0)

NG 2 rc.7

Hi Ionics,
Great work so far with V2!!! Thanks!
Any chance of getting the base projects updated to NG2 rc.7?

I tried the manual way and am getting lots of errors when running ionic serve.

Thanks!

Add platform class hook

010_add_platform_class.js adds platform classes to <body>, but should be adding them to <ion-app> now, right?

Github releases

Hey there,

I think it would help if you publish a release here every time you publish an Ionic Framework release. This way I will be able to come here and see what I need to change in my apps easily.

Index.html not found!

I try to install ionic2 , after install when I try to serve ionic withionic serve it runs in browser and show me this error:

Error: ENOENT: no such file or directory, open '/Users/utabtech/Workspace/ionic/goals/www/index.html'
I compare this installation with my previous installation from a week ago, it contain src directory which doesn't exist in my old project.
Is it replacement for www dir? How can I serve my project? I follow the official documentation.

Angular version question

Hello,
In the base app the we have the angular dependencies 2.0.0. At this moment we have
"@angular/common": "2.1.2",
"@angular/compiler": "2.1.2",
"@angular/core": "2.1.2",
"@angular/forms": "2.1.2",
"@angular/http": "2.1.2",
"@angular/platform-browser": "2.1.2",
"@angular/platform-browser-dynamic": "2.1.2",
"@angular/platform-server": "2.1.2",

Maybe it is possible to change the dependencies?

Seed page classes with constructor/text

Right now we have an empty class for pages we generate in starters. It makes the class feel a bit "read only."

I think it'd be nice if we pre-populated the class, like this at the very least (would love ideas on how to take it further, or expand through code comments):

import {Page} from 'ionic-angular';


@Page({
  templateUrl: 'build/pages/page1/page1.html'
})
export class Page1 {
  constructor() {
  }
}

Ionic2 - is not working from git/master

Followed all instructions from here: https://github.com/driftyco/ionic2-app-base

$ npm install -g ionic@alpha
$ git clone https://github.com/driftyco/ionic2.git
$ cd ionic2
$ npm install
$ gulp src # build the source files
$ npm link

# now go to your app directory
$ cd /Users/Ionitron/git/MyIonic2App
$ npm link ionic-framework

And then update your webpack.config.js file by uncommented the lines for local development: "dist/src/es5/common" // <--- Uncomment me

Geting error on ionic serve:

$ ionic serve
โˆ† Compiling and bundling with Webpack...
โˆš Using your webpack.config.js file: /Users/astec/MyPetProject/ionic2tabs/webpack.config.js 

/usr/local/lib/~/ionic/~/ionic-app-lib/~/css-loader!/usr/local/lib/~/ionic/~/ionic-app-lib/~/autoprefixer/lib/autoprefixer.js?browsers=last 2 version!/usr/local/lib/~/ionic/~/ionic-app-lib/~/resolve-url-loader!/usr/local/lib/~/ionic/~/ionic-app-lib/~/sass-loader?sourceMap!./www/app/app.scss
Module build failed: CssSyntaxError: /css-loader!/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/autoprefixer/lib/autoprefixer.js?browsers=last 2 version!/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/resolve-url-loader/index.js!/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/sass-loader/index.js?sourceMap!/Users/astec/MyPetProject/ionic2tabs/www/app/app.scss:2:7: Unknown word
    at Input.error (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/postcss/lib/input.js:61:21)
    at Parser.unknownWord (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/postcss/lib/parser.js:479:26)
    at Parser.word (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/postcss/lib/parser.js:174:14)
    at Parser.loop (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/postcss/lib/parser.js:60:26)
    at parse (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/postcss/lib/parse.js:25:12)
    at new LazyResult (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/postcss/lib/lazy-result.js:57:24)
    at Processor.process (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/postcss/lib/processor.js:36:16)
    at processCss (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/css-loader/lib/processCss.js:171:11)
    at Object.module.exports (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/css-loader/lib/loader.js:24:2)
 @ ./www/app/app.scss 4:14-545 (CLI v2.0.0-alpha.22)

Your system information:

Cordova CLI: 5.4.0
Gulp version:  CLI version 3.9.0
Gulp local:  
Ionic Version: 2.0.0-alpha.32
Ionic CLI Version: 2.0.0-alpha.22
Ionic App Lib Version: 2.0.0-alpha.21
ios-deploy version: Not installed
ios-sim version: 5.0.3 
OS: Mac OS X Yosemite
Node Version: v4.2.2
Xcode version: Xcode 7.1.1 Build version 7B1005 

Network native plugin

Network plugin is not compatible with the documentation, and wit the newest version of ionic-native.
In the documentation there is

Static Members
type
Connection type

but in the network.d.ts there is still only connection

How can I make an ionic library (a ionic/angular module) project?

For example, I create a database module for A and B projects.
The different between A and B projects is on they provide different views, but in the save data part they all use the same database module.

How can I make that database module project?
What will the project structure look like? like an ionic2-library-base repo?

Wildcard module declaration hides all import errors

I was struggling to understand why an incorrect import statement in my code hadn't been highlighted by my editor (VS Code), when I finally noticed what's in declarations.d.ts.

I'm really not sure that's a good idea. I mean, I can write

import { Nothing } from 'nowhere';

and start using Nothing in my code thinking everything is fine since the editor shows no errors.

Then when I save the app nothing happens, and I need to look at the terminal running ionic serve to see there's a bundle dev update failed: Could not resolve ... error.

Not a very good developer experience. Is this "wildcard module" approach used by anybody else in the TypeScript community?

Use @angular/router: UNMET PEER DEPENDENCY and transpile failed

Hi,
When I used @angular/router, I was in trouble.

hpunews@ /home/jeneser/workspace/hpunews
โ”œโ”€โ”€ UNMET PEER DEPENDENCY @angular/[email protected]
โ”œโ”€โ”€ UNMET PEER DEPENDENCY @angular/[email protected]
โ”œโ”€โ”€ UNMET PEER DEPENDENCY @angular/[email protected]
โ”œโ”€โ”€ @angular/[email protected] 
โ””โ”€โ”€ UNMET PEER DEPENDENCY [email protected]

install @angular/[email protected] ,but,

hpunews@ /home/jeneser/workspace/hpunews
โ”œโ”€โ”€ @angular/[email protected] 
โ””โ”€โ”€ UNMET PEER DEPENDENCY [email protected]

Try to npm run build...

[14:54:43]  transpile started ... 
[14:54:49]  typescript: node_modules/@angular/router/src/common_router_providers.d.ts, line: 9 
            Module '"/home/jeneser/workspace/hpunews/node_modules/@angular/core/index"' has no exported member 
            'ComponentResolver'. 

       L8:  export declare const ROUTER_OPTIONS: OpaqueToken;
      L10:   * @experimental

[14:54:49]  typescript: node_modules/@angular/router/src/config.d.ts, line: 256 
            Generic type 'Type<T>' requires 1 type argument(s). 

     L255:      resolve?: ResolveData;
     L256:      children?: Route[];

[14:54:49]  typescript: node_modules/@angular/router/src/router.d.ts, line: 16 
            Module '"/home/jeneser/workspace/hpunews/node_modules/@angular/core/index"' has no exported member 
            'ComponentResolver'. 

      L15:  import { UrlSerializer, UrlTree } from './url_tree';
      L16:  export interface NavigationExtras {
      L17:      relativeTo?: ActivatedRoute;

[14:54:49]  typescript: node_modules/@angular/router/src/router.d.ts, line: 114 
            Generic type 'Type<T>' requires 1 type argument(s). 

     L113:   * Returns the current url.
     L115:  url: string;

[14:54:49]  typescript: node_modules/@angular/router/src/router_state.d.ts, line: 37 
            Generic type 'Type<T>' requires 1 type argument(s). 

      L37:  * ```    
      L38:  * class MyComponent {

[14:54:49]  typescript: node_modules/@angular/router/src/router_state.d.ts, line: 60 
            Generic type 'Type<T>' requires 1 type argument(s). 

      L60:  * ### Usage    

[14:54:49]  typescript: node_modules/@angular/router/src/router_state.d.ts, line: 85 
            Generic type 'Type<T>' requires 1 type argument(s). 

      L84:  * ### Usage
      L86:  * ```

[14:54:49]  typescript: src/app/app-routing-module.ts, line: 2 
            Module '"/home/jeneser/workspace/hpunews/node_modules/@angular/router/index"' has no exported member 
            'RouterModule'. 

       L1:  import { NgModule } from '@angular/core';
       L2:  import { RouterModule, Routes } from '@angular/router';

[14:54:49]  typescript: src/app/app-routing-module.ts, line: 2 
            Module '"/home/jeneser/workspace/hpunews/node_modules/@angular/router/index"' has no exported member 
            'Routes'. 

       L1:  import { NgModule } from '@angular/core';
       L2:  import { RouterModule, Routes } from '@angular/router';

[14:54:49]  transpile failed 
[14:54:49]  ionic-app-script task: "build" 
[14:54:49]  Error: Error 

env:
ubuntu16.04
node v6.9.2
npm v3.10.9

I do not know how to solve it.but,i found these docs ,

http://ionicframework.com/docs/v2/api/navigation/DeepLinker/

http://ionicframework.com/docs/v2/api/components/nav/Nav/

Thanks!

Importing app.scss into app.js after removing gulp.

Don't know if that repository is the right place for this issue, but starting ionic2 tutorial project pulls this repo first and starter-tutorial second. Don't know why and how they supposed to be merged together, but here is the issue I faced.

After running

ionic start Tutorial tutorial --v2
cd Tutorial
ionic serve

the app starts completely without styles.
I see that gulp was recently removed from ionic2-app-base project, and css bundling is now up to webpack. But index.html still tries to link /www/build/css/app.css and app.js does not import app.scss.

Adding import './app.scss'; to app.js file fixed the styles for me.

theme: fix page selectors and clean up css

Need to go through all of the starters and verify that the page selectors are accurate and that we don't have unnecessary CSS.

Example of an incorrect page selector: https://github.com/driftyco/ionic2-starter-tutorial/blob/master/src/pages/list/list.scss#L1
Example of CSS that we probably should remove: https://github.com/driftyco/ionic2-starter-tutorial/blob/master/src/pages/item-details/item-details.scss

  • Accurate page selectors
  • Remove unnecessary CSS

No gulpfile found

I started a new project and build it , then I got "WARN: No gulpfile found!".

system information:

Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0
OS:
Node Version: v4.4.7

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.